[Rseding91] Insta-undo in the map editor raises no events
Posted: Sat Jun 11, 2022 9:57 pm
When using the map editor's instant undo feature, no events are fired for the destruction of the entities. This breaks several of my mods.
Insta-deconstruction with the deconstruction planner raises script_raised_destroy, so that might make sense, but as long as it fires something, I'll be happy.
Steps to reproduce:
1. Write callbacks for every kind of entity destroyed event (excluding on_entity_destroyed)
2. Place something using the map editor
3. Undo that placement
4. Observe that no events are raised.
I could register them for on_entity_destroyed, but that feature is not meant to be used at scale, and I would have to add it to every single rolling stock on the map.
Insta-deconstruction with the deconstruction planner raises script_raised_destroy, so that might make sense, but as long as it fires something, I'll be happy.
Steps to reproduce:
1. Write callbacks for every kind of entity destroyed event (excluding on_entity_destroyed)
2. Place something using the map editor
3. Undo that placement
4. Observe that no events are raised.
I could register them for on_entity_destroyed, but that feature is not meant to be used at scale, and I would have to add it to every single rolling stock on the map.