Repository navigation
Conversation
Item catalogs and quest books gain version 2 renamed and retired sections, and RestoreContent plus SavePartContent apply them so a save written before a content update still loads and reports every change; strict Restore and RestoreMigrated keep their behavior. Fixes #1540
This branch has not been deployed
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.
Summary
A live game can now declare what a release did to content, and the gameplay packages restore older saves through that declaration instead of refusing them. A version 2 item catalog adds
renamed(old ID to current ID) andretiredentries with an optionalreplacementandrefund;Container.RestoreContent,Equipment.RestoreContentand theirSavePartContentparts apply them, split a stack into free slots when the replacement'smaxStackis lower, and return aRestoreReportfor refunds and notices. A version 2 quest book addsrenamedquests and objectives andretiredquests and objectives;Log.RestoreContentandSavePartContentapply them, clamp progress above a loweredcount, complete an active quest that clamping finishes, drop a retired quest's record with a report, and move or drop retired objective progress. Version 1 catalogs and books stay valid and round-trip byte for byte, strictRestore,RestoreMigratedandSavePartkeep today's refusals, anddocs/enanddocs/zhdocument the formats under "Changing content after release", with an agent note and a changelog fragment. Thegame checkcomparison against the last release tag that the issue sketches is not included: a project declares no content file paths andassetcheck.Checkhas no Git access, so it is left as follow-up work.Related issue
Fixes #1540
Verification
gofmt -l pkg/inventory pkg/questproduces no outputgo tool nsgo check ./pkg/inventory,./pkg/quest,./internal/repocheckpass (run on the remote build machine throughubuild)go tool nsgo test ./pkg/inventory ./pkg/quest ./pkg/save/savetest ./internal/repocheckpasses (run on the remote build machine throughubuild, withrepocheckonce under a fresh build cache so the docs changes were read)bun run verify-notespassesgo run ./tools/changelog checkpassesdocs/en/anddocs/zh/updatedgo tool nsgo checkfrom the template were not run: this change is package-scoped and only the affected packages were checked and tested.Screenshots
None: no visible UI changes.
Acceptance for every editor PR
Not an editor change; the editor checklist does not apply.