Skip to content

Commit

Permalink
Fix a wierd bug
Browse files Browse the repository at this point in the history
Steps to reproduce:
1. reset everything in custom game
2. restart the game
3. go to the custom game scene
4. go to the custom sequence scene and set a new sequence
5. leave the scene and go to the custom game scene
6. begin to clear

Unintended behavior:
The sequence is still the default old sequence (7-bag)

Intended behavior:
The sequence is the newly set sequence

Rationale:
The bug was introduced by #1139.
It deleted a line of `apply_locals()` which I wrongly believed that the custom modes will execute initialize() anyway, but it turned out initialization is only executed during the start of the whole game.
The patch is simple: just add back the deleted line
  • Loading branch information
ImpleLee committed Oct 17, 2024
1 parent 9e4e861 commit 45db3f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions parts/scenes/customGame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ local function _play(mode)
end
end
saveFile(CUSTOMGAME_LOCAL.customenv,'conf/customEnv')
apply_locals()
loadGame('custom_'..mode,true)
end

Expand Down

0 comments on commit 45db3f9

Please sign in to comment.