Cancel deconstructing

Place to get help with not working mods / modding interface.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Cancel deconstructing

Post by darkfrei »

Hi! How to set all entities marked to deconstructing not more to deconstructing?
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5431
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Cancel deconstructing

Post by Klonan »

Something like this:

Code: Select all

for k, v in pairs (game.player.surface.find_entities()) do
  v.cancel_deconstruction(game.player.force)
end
Post Reply

Return to “Modding help”