Storage and copy/paste
Posted: Thu Dec 12, 2024 4:11 am
Right now I have some custom entities that use filters. The filters don't exist as part of any normal prototype's behavior. They're set by a custom GUI and indicated by manually drawing a sprite. The state of each filter is tracked in storage.my_cool_entity_filters[my_entity.unit_number] . And there are other custom variables in storage, associated with various custom entities.
This method of storing entity info doesn't cooperate with copy/paste, or blueprints, or shift-right-click. And there's probably other ways entity info is copied that I'm forgetting.
Is there a natural way to store custom status info about an entity? I can see LuaEntity has custom_status but that seems clunky, and it displays the info to the player. What do people use?
This method of storing entity info doesn't cooperate with copy/paste, or blueprints, or shift-right-click. And there's probably other ways entity info is copied that I'm forgetting.
Is there a natural way to store custom status info about an entity? I can see LuaEntity has custom_status but that seems clunky, and it displays the info to the player. What do people use?