Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save states for TileObjects #1328

Open
cosmiccoincidence opened this issue Nov 14, 2023 · 2 comments
Open

Save states for TileObjects #1328

cosmiccoincidence opened this issue Nov 14, 2023 · 2 comments
Labels
Difficulty: Rocket science 🚀 We don't even dare to try. Good luck. Feature A new system or other feature. Tilemaps Tasks related to the tilemap system or its connectors.

Comments

@cosmiccoincidence
Copy link
Member

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 cosmiccoincidence added Feature A new system or other feature. Tilemaps Tasks related to the tilemap system or its connectors. Difficulty: Rocket science 🚀 We don't even dare to try. Good luck. labels Nov 14, 2023
@cosmiccoincidence
Copy link
Member Author

cosmiccoincidence commented Nov 14, 2023

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
Copy link
Contributor

stilnat commented Nov 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Rocket science 🚀 We don't even dare to try. Good luck. Feature A new system or other feature. Tilemaps Tasks related to the tilemap system or its connectors.
Projects
None yet
Development

No branches or pull requests

2 participants