GameState: Persist current scene in global, not scene, state#2045
Open
GameState: Persist current scene in global, not scene, state#2045
Conversation
Previously the current scene was persisted as part of the quest state. When you return to Fray's End after completing a trio of Sokobans, all quest state is erased from the saved data, meaning that the current scene path is lost. As a result, if you: - Complete a quest - Complete all three Sokobans & return to Fray's End - Exit the game - Relaunch the game then you were previously offered the chance to Continue. However this would try to change scene to empty string, which fails and reloads the title screen. Fix this in two ways: 1. Persist the current scene as part of the global state, not as part of the quest state. 2. Only offer the chance to continue a saved game if the current scene is known. Add some assertions at relevant points. Resolves #1946
|
Play this branch at https://play.threadbare.game/branches/endlessm/wjt/gamestate-persist-current-scene-in-global-not-scene-state. (This launches the game from the start, not directly at the change(s) in this pull request.) |
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.
Previously the current scene was persisted as part of the quest state.
When you return to Fray's End after completing a trio of Sokobans, all
quest state is erased from the saved data, meaning that the current
scene path is lost.
As a result, if you:
then you were previously offered the chance to Continue. However this
would try to change scene to empty string, which fails and reloads the
title screen.
Fix this in two ways:
the quest state.
is known.
Add some assertions at relevant points.
Resolves #1946