diff --git a/src/phases.ts b/src/phases.ts index fcd3cfb8801..fdd3a8a088d 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -321,6 +321,7 @@ export class TitlePhase extends Phase { loadSaveSlot(slotId: integer): void { this.scene.sessionSlotId = slotId > -1 || !loggedInUser ? slotId : loggedInUser.lastSessionSlot; this.scene.ui.setMode(Mode.MESSAGE); + this.scene.ui.resetModeChain(); this.scene.gameData.loadSession(this.scene, slotId, slotId === -1 ? this.lastSessionData : undefined).then((success: boolean) => { if (success) { this.loaded = true; diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 0c99953c62d..5cefed05850 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -97,6 +97,7 @@ export default class MenuUiHandler extends MessageUiHandler { render() { const ui = this.getUi(); + console.log(ui.getModeChain()); this.excludedMenus = () => [ { condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain()[0]), options: [ MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] }, { condition: bypassLogin, options: [ MenuOptions.LOG_OUT ] } diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 8ea4270deb3..c3dc2507682 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -497,6 +497,10 @@ export default class UI extends Phaser.GameObjects.Container { return this.setModeInternal(mode, false, false, true, args); } + resetModeChain(): void { + this.modeChain = []; + } + revertMode(): Promise { return new Promise(resolve => { if (!this?.modeChain?.length) {