Page 1 of 1

allow storing tags in on_*_mined_entity event table for undo

Posted: Wed Dec 02, 2020 9:33 am
by Jaren Taq
Hello,

as already described in viewtopic.php?f=25&t=92143, I want to restore the state of my custom entity, if it is recreated with undo after mining it.

I think an easy solution might be to extend the event table of the on_player_mined_entity and on_robot_mined_entity with tags, which can be populated by the event handler. If the entity is restored with undo by placing a ghost, these tags can be copied into the ghost-item. The event handler of on_built_entity and on_robot_built_entity can evaluate the tags in their event table like when they came when placed a blueprint.

Thanks, Jaren