User:Joshinils: Difference between revisions
Jump to navigation
Jump to search
m (added full list of to be translated pages) |
m (→Subpages) |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<div style="column-width:600px;"> | |||
=== [[User: | == Subpages == | ||
{{ | |||
[[Special:Contributions/Joshinils]] | |||
{{Special:PrefixIndex/User:Joshinils}} | |||
== copy-pasta == | |||
<pre> | |||
== Siehe auch == | |||
* [[Research/de|Forschung]] | |||
* [[Technologies/de|Technologien]] | |||
</pre> | |||
<pre> | |||
! Technologie !! Kosten !! Auswirkung !! Aufaddierte <br/>Auswirkung | |||
</pre> | |||
Block that puts ''foo'' and ''bar'' next to each another if there is space, else it wraps and puts them underneath: | |||
<pre> | |||
<div><ul> | |||
<li style="display:inline-block;"> foo </li> | |||
<li style="display:inline-block;"> bar </li> | |||
</ul></div> | |||
</pre> | |||
== Lua stuff == | |||
Screenshot command: | |||
<syntaxhighlight lang="lua" line='line'> | |||
/c game.take_screenshot{resolution={x=1000, y=1000}, zoom=2, show_entity_info=true} | |||
</syntaxhighlight> | |||
Remaining research command: | |||
<syntaxhighlight lang="lua" line='line'> | |||
/c global.research=function(amount) | |||
if amount==nil then | |||
game.print(game.player.force.research_progress*100 .."% done") | |||
else | |||
game.print(amount -game.player.force.research_progress*amount.." packs needed") | |||
end | |||
end | |||
</syntaxhighlight> | |||
Reveal circular area around input (default <syntaxhighlight lang="lua" inline>{x=0,y=0}</syntaxhighlight>, can be exchanged with <syntaxhighlight lang="lua" inline>game.player.position</syntaxhighlight>) | |||
<syntaxhighlight lang="lua" line='line'> | |||
/c global.reveal=function(input) | |||
--[[set radius the first time this gets run]] | |||
global=global or {} | |||
global.radius=global.radius or 128 | |||
radius_squared=global.radius*global.radius | |||
origin=input or {x=0, y=0} | |||
for x=-global.radius, global.radius, 32 do | |||
for y=-global.radius, global.radius, 32 do | |||
if x*x+y*y<radius_squared then | |||
game.player.force.chart(game.player.surface, {{origin.x+x, origin.y+y }, {origin.x+x, origin.y+y }}) | |||
end | |||
end | |||
end | |||
game.print("r="..global.radius) | |||
--[[increase radius every successive time it is run, may be set outside of this function]] | |||
global.radius=global.radius+32 | |||
end | |||
</syntaxhighlight> | |||
Delete everything except the player character (when <syntaxhighlight lang="lua" inline>input==nil</syntaxhighlight>, when <syntaxhighlight lang="lua" inline>all</syntaxhighlight> is present, then everything including the player character gets deleted) | |||
<syntaxhighlight lang="lua" line='line'> | |||
/c global.delete=function(input, all) | |||
for surface in pairs(game.surfaces) do | |||
for _, ent in pairs(surface.find_entities_filtered{type=input} do | |||
if all or (ent.type~="player" and input~="player") then entity.destroy() end | |||
end | |||
end | |||
end | |||
</syntaxhighlight> | |||
[https://wiki.factorio.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=jsonfm job que] | |||
{| | |||
|- | |||
| [[Factorio:Wanted_pages#German_Wanted_Pages|List Of German Wanted Pages]] {{Factorio:Wanted_pages/de}} | |||
|} | |||
</div> |
Latest revision as of 00:29, 4 February 2020
Subpages
Special:Contributions/Joshinils
copy-pasta
== Siehe auch == * [[Research/de|Forschung]] * [[Technologies/de|Technologien]]
! Technologie !! Kosten !! Auswirkung !! Aufaddierte <br/>Auswirkung
Block that puts foo and bar next to each another if there is space, else it wraps and puts them underneath:
<div><ul> <li style="display:inline-block;"> foo </li> <li style="display:inline-block;"> bar </li> </ul></div>
Lua stuff
Screenshot command:
/c game.take_screenshot{resolution={x=1000, y=1000}, zoom=2, show_entity_info=true}
Remaining research command:
/c global.research=function(amount)
if amount==nil then
game.print(game.player.force.research_progress*100 .."% done")
else
game.print(amount -game.player.force.research_progress*amount.." packs needed")
end
end
Reveal circular area around input (default {x=0,y=0}
, can be exchanged with game.player.position
)
/c global.reveal=function(input)
--[[set radius the first time this gets run]]
global=global or {}
global.radius=global.radius or 128
radius_squared=global.radius*global.radius
origin=input or {x=0, y=0}
for x=-global.radius, global.radius, 32 do
for y=-global.radius, global.radius, 32 do
if x*x+y*y<radius_squared then
game.player.force.chart(game.player.surface, {{origin.x+x, origin.y+y }, {origin.x+x, origin.y+y }})
end
end
end
game.print("r="..global.radius)
--[[increase radius every successive time it is run, may be set outside of this function]]
global.radius=global.radius+32
end
Delete everything except the player character (when input==nil
, when all
is present, then everything including the player character gets deleted)
/c global.delete=function(input, all)
for surface in pairs(game.surfaces) do
for _, ent in pairs(surface.find_entities_filtered{type=input} do
if all or (ent.type~="player" and input~="player") then entity.destroy() end
end
end
end