Evil Mass cancel

Arrange meetings with other people to play MP, announce your servers.
Post Reply
iterat0r
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Sep 01, 2016 5:10 pm
Contact:

Evil Mass cancel

Post by iterat0r »

How can I mass cancel deconstruction commands for objects marked for deconstructrion by assholes joining the public server?

psznm
Inserter
Inserter
Posts: 40
Joined: Mon Oct 05, 2015 1:42 pm
Contact:

Re: Evil Mass cancel

Post by psznm »

the same way you would mark things for deconstruction, except you hold shift.

noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Re: Evil Mass cancel

Post by noliVe »

yes he asked for a command that clears all the marks in one blow on the whole map.

im sorry i have no clue

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Evil Mass cancel

Post by Ranakastrasz »

Well, Looking at the API, "cancel_deconstruction(force)" for an entity is clearly the way to go. You need to select all entities effected, and apply it. Not sure how to do that part. Not good with command scripts myself.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Evil Mass cancel

Post by Nexela »

Prepare for some potential lag while it runs

/c for _, entity in pairs(game.player.surface.find_entities()) do entity.cancel_deconstruction(game.player.force) end

iterat0r
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Sep 01, 2016 5:10 pm
Contact:

Re: Evil Mass cancel

Post by iterat0r »

Thanks, all your replies are really useful.

Post Reply

Return to “Multiplayer”