Files
Bubberstation/code/modules/client
san7890 52c7ae300e Better Savefile Versioning (Define Macros Edition) (#91898)
## About The Pull Request

Savefile versioning is quite robust, but it relied a lot on comments to
explain why exactly it worked (such as needing to explain that
error/empty states were negative integers only because any valid
savefile version would be a positive integer). Anyways, let's spell it
out a lot more using `#define` values and dmdoccing said values in order
to make the whole system a bit more cohesive.

This also corrects an issue that has irked me for a while, which is that
we call and go through `update_preferences()` or `update_character()`
_every single time_. `SAVEFILE_VERSION_MAX` is essentially just a
placeholder, it's not checked against anything! Let's use that in one of
the new macros we created so we can slim down on the proc call overhead
(as well as whole branches of code) that we iterate through every single
time we load a savefile. Like we were generating a backup json every
single run without fail, let's trim that out when it's not necessary.
## Why It's Good For The Game

More clear for people operating on this code in the future as well as
does a lot less work. Win win.
## Changelog
Tested it and it migrated my savefile from 48 -> 49 without any ill
effect. Let me know if we want to have the redundancy behavior baked in
where we call these procs/enter code branches every single time though-
I would rather just bake the code in that way rather than live in a
world of confusion on why it operates that way.

🆑
server: Savefile migration has been tweaked a bit, though there
realistically shouldn't be any issues with this. Keep a wary eye out
though.
/🆑
2025-07-06 22:13:18 -07:00
..
2025-06-25 17:36:10 -07:00
2025-06-25 17:36:10 -07:00