-
Notifications
You must be signed in to change notification settings - Fork 27
Incrementing IDs #423
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
Incrementing IDs #423
Conversation
aa8bf2d to
34df044
Compare
Sean-Brown
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading the discussions, the code changes make sense
QuintillusCFC
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me as well. I'm going to see if this can be merged into the godot4 branch, keeping it from depending upon the tilemaps.
|
Nope, GitHub is not smart enough to figure out that I'd like to essentially rebase or cherry-pick to a different base. I will see if I can do that locally and thus allow decoupling of saves from tilemaps to proceed. |
|
Okay, well, I accidentally cherry-picked right to |
Object IDs are discussed here: #210
Also here for save format: #377
This change is a prerequisite for implementing something like my save format draft #413 and I intend this to be an incremental change towards an actual PR for getting working save game. Having said that, regardless of how save game is implemented in the future, this PR refactors and removes string-based GUID for units and cities, and an ad-hoc ID system that was being used for tiles. The ID class consists of a string key and a unique integer value. I did not implement more complex custom ID's that would allow for things like - for cities, since this would require more complex ID parsing from saves, but can always be added in the future as a refactor of the ID class (or probably making it an interface...).
This change should not affect gameplay.