RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
252 stars 139 forks source link

Save states for TileObjects #1328

Open cosmiccoincidence opened 10 months ago

cosmiccoincidence commented 10 months ago

Summary

Add object save states for all TileObject types.

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:

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 commented 10 months ago

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.

stilnat commented 10 months ago

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.