Search found 947 matches

by prg
Sat Jul 08, 2017 5:20 pm
Forum: Modding help
Topic: [Resolved] Who Killed the Biter...
Replies: 6
Views: 2181

Re: Who Killed the Biter...

on_entity_died
Called when an entity dies.

Contains
entity :: LuaEntity
cause :: LuaEntity (optional): The entity that did the killing if available.
force :: LuaForce (optional): The force that did the killing if any.
by prg
Fri Jul 07, 2017 6:35 pm
Forum: News
Topic: Friday Facts #198 - Rail segment visualisation
Replies: 116
Views: 67804

Re: Friday Facts #198 - Rail segment visualisation

pleegwat wrote:Yes, but you may want to colour all those 2's as if they're adjacent for clarity. And such preferences may lead to non-planar problems which aren't 4-colourable.
If two nodes with the same color end up next to each other, you could simply add an edge between them and still have a planar graph, no?
by prg
Fri Jul 07, 2017 5:54 pm
Forum: News
Topic: Friday Facts #198 - Rail segment visualisation
Replies: 116
Views: 67804

Re: Friday Facts #198 - Rail segment visualisation

y.petremann wrote:Proof of concept of what I've said : Image
Here their is two magenta part connected together
a.jpg
a.jpg (100.63 KiB) Viewed 15216 times
by prg
Thu Jul 06, 2017 5:09 pm
Forum: Technical Help
Topic: Cannot lock items in quickbar
Replies: 2
Views: 1297

Re: Cannot lock items in quickbar

Version 0.15.24
Changes
  • Changed default keybind for toggle filters on macOS to Command + Right Click (50253)
Maybe this is related.
by prg
Mon Jun 26, 2017 6:46 pm
Forum: Modding discussion
Topic: Invoking a Lua command on startup?
Replies: 6
Views: 2677

Re: Invoking a Lua command on startup?

Code: Select all

  17.687 Received SIGTERM, shutting down
  17.789 Goodbye
It'll still shutdown cleanly if you give it the chance, i.e. use SIGTERM or SIGINT instead of SIGKILL.
by prg
Fri Jun 23, 2017 9:14 pm
Forum: Modding discussion
Topic: Invoking a Lua command on startup?
Replies: 6
Views: 2677

Re: Invoking a Lua command on startup?

print("screenshot done"), listen for that string with a script, kill the process.
by prg
Fri Jun 23, 2017 7:19 pm
Forum: Technical Help
Topic: Standart Forces Name Change?
Replies: 8
Views: 3022

Re: Standart Forces Name Change?

What makes you think the buildings belong to two forces at the same time?
by prg
Fri Jun 23, 2017 6:38 pm
Forum: Technical Help
Topic: Standart Forces Name Change?
Replies: 8
Views: 3022

Re: Standart Forces Name Change?

Could you rephrase that question? What did you do already, what are you trying to achieve exactly?
by prg
Thu Jun 22, 2017 5:07 pm
Forum: Technical Help
Topic: Standart Forces Name Change?
Replies: 8
Views: 3022

Re: Standart Forces Name Change?

Code: Select all

/c for _, entity in pairs(game.player.surface.find_entities_filtered{force="player"}) do entity.force="new-force" end
(assuming you only have one surface with player stuff on it)
by prg
Tue Jun 20, 2017 9:36 pm
Forum: Modding help
Topic: Flamethrower turret ammo
Replies: 1
Views: 702

Re: Flamethrower turret ammo

Code: Select all

table.insert(data.raw["fluid-turret"]["flamethrower-turret"].attack_parameters.fluids, {type="water", damage_modifier=20})
by prg
Tue Jun 20, 2017 4:48 pm
Forum: Modding help
Topic: Fluid registration
Replies: 4
Views: 1344

Re: Fluid registration

Look at how the base mod defines fluid prototypes and add the missing keys and units.
by prg
Mon Jun 12, 2017 6:14 pm
Forum: Modding help
Topic: Error in assign ID
Replies: 14
Views: 14930

Re: Error in assign ID

This fill-barrel thing now seems to happen when you used to have Factorio 0.15 installed which for some reason got downgraded to 0.14 again, leaving around some files of the newer version. Either update to 0.15 again or remove the Factorio directory to get rid of the extraneous files, then reinstall...
by prg
Fri Jun 09, 2017 4:45 pm
Forum: Modding help
Topic: negative Pollution, Evo Factor
Replies: 4
Views: 1667

Re: negative Pollution, Evo Factor

fns = { function() game.surfaces.nauvis.pollute({0,0}, -1e7) end, function() print(game.forces.enemy.evolution_factor) end, function() game.surfaces.nauvis.pollute({0,0}, -1e7) end, function() print(game.forces.enemy.evolution_factor) end, function() game.surfaces.nauvis.pollute({0,0}, -1e7) end, f...
by prg
Fri Jun 02, 2017 4:19 pm
Forum: Technical Help
Topic: Command to pick up all items on floor
Replies: 7
Views: 8234

Re: Command to pick up all items on floor

Code: Select all

for _, entity in pairs(game.player.surface.find_entities_filtered{type="item-entity", name="item-on-ground"}) do
    game.player.insert(entity.stack)
    entity.destroy()
end
by prg
Fri May 26, 2017 7:18 pm
Forum: Modding help
Topic: Question about on_player_selected_area
Replies: 2
Views: 817

Re: Question about on_player_selected_area

Does the selection-tool's selection_mode contain "any-tile"?
by prg
Fri May 26, 2017 4:18 pm
Forum: Modding help
Topic: How to know that a laboratory is working?
Replies: 4
Views: 1162

Re: How to know that a laboratory is working?

inventory = game.player.selected.get_inventory(defines.inventory.lab_input) script.on_event(defines.events.on_tick, function(event) print("tick " .. game.tick) for i = 1, 7 do local item = inventory[i] if item.valid_for_read then print(item.name .. ": " .. item.durability) end e...
by prg
Fri May 26, 2017 3:58 pm
Forum: Gameplay Help
Topic: How do you enable the task list?
Replies: 3
Views: 1894

Re: How do you enable the task list?

You can put your custom fun code snippets into the save game's control.lua.
by prg
Thu May 25, 2017 3:24 pm
Forum: Modding help
Topic: How to know that a laboratory is working?
Replies: 4
Views: 1162

Re: How to know that a laboratory is working?

Also not the most elegant way imaginable, but in line with what you're already doing there: maybe you could have a look at lab.get_inventory(defines.inventory.lab_input)[1 ... 7].durability and see if that changes over time.
by prg
Sat May 20, 2017 4:45 pm
Forum: This Forum
Topic: code: select all jumps to top of page
Replies: 6
Views: 2297

Re: code: select all jumps to top of page

Huh, okay, it's still working fine in Firefox 45, it's broken in 53.
by prg
Sat May 20, 2017 2:38 pm
Forum: This Forum
Topic: code: select all jumps to top of page
Replies: 6
Views: 2297

Re: code: select all jumps to top of page

Allow factorio.com in NoScript.

Go to advanced search