From 3a50925de00d7ad0a2ca1441649409c934bc5e58 Mon Sep 17 00:00:00 2001 From: Frederico Santos Date: Sat, 31 Aug 2024 05:14:25 +0100 Subject: [PATCH] refactor: Update excludedMenus condition to look for currentPhase instead --- src/ui/menu-ui-handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index e8f2038aa2c..6349d219827 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -12,6 +12,7 @@ import { Button } from "#enums/buttons"; import { GameDataType } from "#enums/game-data-type"; import BgmBar from "#app/ui/bgm-bar"; import AwaitableUiHandler from "./awaitable-ui-handler"; +import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; enum MenuOptions { GAME_SETTINGS, @@ -106,7 +107,7 @@ export default class MenuUiHandler extends MessageUiHandler { render() { const ui = this.getUi(); this.excludedMenus = () => [ - { condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain().at(-1)!), options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] }, + { condition: this.scene.getCurrentPhase() instanceof SelectModifierPhase, options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] }, { condition: bypassLogin, options: [MenuOptions.LOG_OUT] } ];