[Bug] Fixed bug where pokemon info container shows form of pokemon that doesn't have it if the previously caught pokemon has a form (#2029)

* Fixed bug where pokemon info container will show form of a pokemon that doesn't have it if the previously caught pokemon has a form

* Updated pokemonFormText to also disable interactive section if there was one
This commit is contained in:
Opaque02 2024-06-10 15:41:06 +10:00 committed by GitHub
parent 91abddb693
commit 5de0185c0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -247,6 +247,10 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
} else {
this.pokemonFormText.disableInteractive();
}
} else {
this.pokemonFormLabelText.setVisible(false);
this.pokemonFormText.setVisible(false);
this.pokemonFormText.disableInteractive();
}
const abilityTextStyle = pokemon.abilityIndex === (pokemon.species.ability2 ? 2 : 1) ? TextStyle.MONEY : TextStyle.WINDOW;