From 47cb203068da7f8427e3bc0e26f35d1b2949a7d6 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Fri, 10 Jan 2025 00:02:09 +0100 Subject: [PATCH] =?UTF-8?q?Showing=20types=20on=20Pok=C3=A9mon=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/pokedex-page-ui-handler.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index 1387031629b..7148de6fb3c 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -1983,13 +1983,13 @@ export default class PokedexPageUiHandler extends MessageUiHandler { } else { this.pokemonGrowthRateText.setText(""); this.pokemonGrowthRateLabelText.setVisible(false); - this.type1Icon.setVisible(false); - this.type2Icon.setVisible(false); + this.type1Icon.setVisible(true); + this.type2Icon.setVisible(true); this.pokemonLuckLabelText.setVisible(false); this.pokemonLuckText.setVisible(false); this.pokemonShinyIcon.setVisible(false); this.pokemonUncaughtText.setVisible(true); - this.pokemonCaughtHatchedContainer.setVisible(false); + this.pokemonCaughtHatchedContainer.setVisible(true); this.pokemonCandyContainer.setVisible(false); this.pokemonFormText.setVisible(false); @@ -2032,6 +2032,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler { setSpeciesDetails(species: PokemonSpecies, options: SpeciesDetails = {}): void { let { shiny, formIndex, female, variant } = options; + const forSeen: boolean = options.forSeen ?? false; const oldProps = species ? this.starterAttributes : null; // We will only update the sprite if there is a change to form, shiny/variant @@ -2160,7 +2161,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler { } - if (dexEntry.caughtAttr) { + if (dexEntry.caughtAttr || forSeen) { const speciesForm = getPokemonSpeciesForm(species.speciesId, formIndex!); // TODO: is the bang correct? this.setTypeIcons(speciesForm.type1, speciesForm.type2); this.pokemonFormText.setText(this.getFormString((speciesForm as PokemonForm).formKey, species));