SS3D
SS3D copied to clipboard
Save states for TileObjects
Summary
Add object save states for all TileObject types.
- Regular (structures & furniture)
- Items
- Entities (NOT yet implemented)
Goal
Currently the tilemap does not recognize attribute changes to objects. We need to add this ability and allow the tilemap to save object attributes.
Examples:
- On/Off (power)
- On/Off (lights)
- Material changes
- Open/Close
- Broken
- Damaged
- Bolted
- Dirty
- Container Contents (object)
- Container Contents (liquid)
- Alive/Dead
- etc..
It's probably recommended to use the Traits system for most of these.
Documentation
Tilemaps: https://ss3d.gitbook.io/systems/tilemaps
Traits: https://ss3d.gitbook.io/systems/traits
It should be noted that this is asking for the expansion of the tilemap save system, it does not require to actually add all known objects states to every TileObject.
quick suggestion, not well thought though. Have an ISavable interface with method save and load, have each component that need to have some values saved implement it. Upon reload, for each object loaded, check the components implementing the ISavable interface and call the Load method.