allow storing tags in on_*_mined_entity event table for undo

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Jaren Taq
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Nov 28, 2020 8:26 am
Contact:

allow storing tags in on_*_mined_entity event table for undo

Post 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

Post Reply

Return to “Modding interface requests”