Map editor instant deconstruction should raise events

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

Re: Map editor instant deconstruction should raise events

Post by eradicator »

Raiguard wrote:
Wed Aug 28, 2019 7:15 pm
I already tried requesting this capability separately, Rseding shot me down quicker than a drone flying over Area 51, similar to how this thread was immediately dismissed at first.
Well, then why don't you try to throw more arguments at your original thread instead of leaking into this one? If i was a moderator i'd have merged them back already :p.

code
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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3139
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Map editor instant deconstruction should raise events

Post by Bilka »

DaveMcW wrote: 2. Enter map editor
3. Make sure Settings -> Instant deconstruction is on.
4. Select Tools -> None.
5. Pick up a deconstruction planner and deconstruct something.
Just to make this clear for anyone coming across this thread: The script_raised_destroy event was only added for the case of instant deconstruction via using a deconstruction planner in the map editor, quoted above.

Destroying an entity by using the "entity" tab in the map editor and "mining" it does NOT raise an event by default (as of writing this post). If you want to be notified of an entity being destroyed via the map editor entity tab, register it for the on_entity_destroyed and listen to the event. This event is raised for any kind of entity destruction (once registered for the entity), including but not limited to using the entity tab in the map editor, chunks or surfaces being removed, or just plain old things like a player mining the entity.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Implemented mod requests”