SS3D icon indicating copy to clipboard operation
SS3D copied to clipboard

Save states for TileObjects

Open cosmiccoincidence opened this issue 1 year ago • 2 comments

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

cosmiccoincidence avatar Nov 14 '23 20:11 cosmiccoincidence

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.

cosmiccoincidence avatar Nov 14 '23 20:11 cosmiccoincidence

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.

stilnat avatar Nov 14 '23 20:11 stilnat