From 82dfe015761989d1789fdd3c3589d24493b057b4 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Thu, 15 May 2025 00:41:12 +0200 Subject: [PATCH] Changed condition on switch for clarity --- src/ui/party-ui-handler.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index dee251dcab8..d4ce186698b 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -807,8 +807,11 @@ export default class PartyUiHandler extends MessageUiHandler { return true; } - // This is used when switching out using the Pokemon command (possibly holding a Baton held item). - if ((option === PartyOption.PASS_BATON || option === PartyOption.SEND_OUT) && !this.selectCallback) { + // This is used when switching out using the Pokemon command (possibly holding a Baton held item). In this case there is no callback. + if ( + (option === PartyOption.PASS_BATON || option === PartyOption.SEND_OUT) && + this.partyUiMode === PartyUiMode.SWITCH + ) { this.clearOptions(); (globalScene.getCurrentPhase() as CommandPhase).handleCommand( Command.POKEMON,