Fix a wierd bug (#1161)

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
This commit is contained in:
Imple Lee
2024-10-18 00:45:37 +08:00
committed by GitHub
parent 9e4e861c32
commit fbf6e910a3

View File

@@ -145,6 +145,7 @@ local function _play(mode)
end
end
saveFile(CUSTOMGAME_LOCAL.customenv,'conf/customEnv')
apply_locals()
loadGame('custom_'..mode,true)
end