Skip to content

GameState: Set scene when not persisting progress#2544

Merged
manuq merged 1 commit into
mainfrom
fix-lights-on
Jul 14, 2026
Merged

GameState: Set scene when not persisting progress#2544
manuq merged 1 commit into
mainfrom
fix-lights-on

Conversation

@manuq

@manuq manuq commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

When progress is not persisted, that is when the game runs from a specific scene that is not the main one, GameState.scene should be set to a new PerSceneState resource. Otherwise the game may fail to access its properties like lights_on.

Fix #2543

When progress is not persisted, that is when the game runs from a specific scene
that is not the main one, GameState.scene should be set to a new PerSceneState
resource. Otherwise the game may fail to access its properties like lights_on.

Fix #2543
@manuq
manuq marked this pull request as ready for review July 14, 2026 16:02
@manuq
manuq requested a review from a team as a code owner July 14, 2026 16:02
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/fix-lights-on/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@felixwalberg felixwalberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. Otherwise, the game would have no current scene and no way to reference information related to it, as you mentioned.

@manuq
manuq merged commit cf93864 into main Jul 14, 2026
7 checks passed
@manuq
manuq deleted the fix-lights-on branch July 14, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Game state bug: Invalid access to property or key 'lights_on' on a base object of type 'Nil'

3 participants