Merge branch 'beta' into gitlocalize-30762

This commit is contained in:
José Ricardo 2024-09-01 19:30:26 -03:00 committed by GitHub
commit 57f46185ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -166,6 +166,8 @@ export default class PartyUiHandler extends MessageUiHandler {
private iconAnimHandler: PokemonIconAnimHandler; private iconAnimHandler: PokemonIconAnimHandler;
private blockInput: boolean;
private static FilterAll = (_pokemon: PlayerPokemon) => null; private static FilterAll = (_pokemon: PlayerPokemon) => null;
public static FilterNonFainted = (pokemon: PlayerPokemon) => { public static FilterNonFainted = (pokemon: PlayerPokemon) => {
@ -317,7 +319,7 @@ export default class PartyUiHandler extends MessageUiHandler {
processInput(button: Button): boolean { processInput(button: Button): boolean {
const ui = this.getUi(); const ui = this.getUi();
if (this.pendingPrompt) { if (this.pendingPrompt || this.blockInput) {
return false; return false;
} }
@ -485,7 +487,9 @@ export default class PartyUiHandler extends MessageUiHandler {
this.clearOptions(); this.clearOptions();
ui.playSelect(); ui.playSelect();
if (this.cursor >= this.scene.currentBattle.getBattlerCount() || !pokemon.isAllowedInBattle()) { if (this.cursor >= this.scene.currentBattle.getBattlerCount() || !pokemon.isAllowedInBattle()) {
this.blockInput = true;
this.showText(i18next.t("partyUiHandler:releaseConfirmation", { pokemonName: getPokemonNameWithAffix(pokemon) }), null, () => { this.showText(i18next.t("partyUiHandler:releaseConfirmation", { pokemonName: getPokemonNameWithAffix(pokemon) }), null, () => {
this.blockInput = false;
ui.setModeWithoutClear(Mode.CONFIRM, () => { ui.setModeWithoutClear(Mode.CONFIRM, () => {
ui.setMode(Mode.PARTY); ui.setMode(Mode.PARTY);
this.doRelease(this.cursor); this.doRelease(this.cursor);