Revert event

Place to get help with not working mods / modding interface.
Post Reply
TheThunderBirds
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Oct 15, 2017 6:15 pm
Contact:

Revert event

Post by TheThunderBirds »

Is it possible to cancel or revert a triggered event? Im trying to create a mod where instead of picking up a building it gets marked for deconstruction. Marking isn't that difficult but not having the building deconstructed a lot more. I tried to respawn a copy of the building but then the player still receives the items and making sure that everything gets copied is a real pain.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Revert event

Post by eradicator »

TheThunderBirds wrote:Is it possible to cancel or revert a triggered event?
Nope.
I suppose you could mark entities as LuaEntity.minable = false (or in the prototypes) and use a custom hotkey to catch the right-click event.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Modding help”