Repository navigation
Saves carry across content and format changes - #146
Merged
Merged
Conversation
Saves now read through Core/SaveFormat: parse, migrate (one step per version), then reconcile every content id with today's content. - old_ids (old_skins for ships) on items, upgrades, universes, ships, classes and origins: a renamed id resolves to its replacement. - A removed item is paid back at the value saved with it (pack items now keep their value); a removed skin or universe falls back to the default; upgrade levels clamp to what exists; an unknown job kind is dropped. - content/shipped_ids.json lists every id ever shipped; ln.py gen (and gen --check in CI) fails if one stops resolving. - An unreadable slot is kept as ln.save.N.broken before a new run is written over it. - SaveCompatTests load 0.4.1 and older saves, check renames, removals, round trips and unreadable/newer saves. - docs/saves.md: what to do when changing content or the save format.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Old save slots keep loading as content and the save format change. See docs/saves.md.
What changed
Versionis now 2), then reconcile it with today's content.SavePresenterreads and writes through it.old_ids(old_skinson ShipStats): added to ItemDef, ShipUpgrade, Universe, ShipStats, CharacterClass and CharacterOrigin. A save that holds a renamed id gets the replacement.[Save] slot N: ....ln.py genadds to it, andgen(andgen --checkin CI) fails if a listed id no longer resolves. Renaming or removing content without an alias is caught before release.ln.save.N.brokenbefore a new run overwrites it.old_ids;Tested
ln.py tests: 83/83 pass.gen --checkis up to date.carbinein a scratch copy of the content (not committed). Without an alias,gen --checkfails and names it. Withold_idsit resolves..broken.