[Bug] fixed persistent shinyIcon bug (#2605)

This commit is contained in:
Teju Rajbabu 2024-06-25 18:20:40 -04:00 committed by GitHub
parent d2e97979bd
commit 6046b9bfae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2034,6 +2034,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.pokemonLuckText.setText(luck.toString()); this.pokemonLuckText.setText(luck.toString());
this.pokemonLuckText.setTint(getVariantTint(Math.min(luck - 1, 2) as Variant)); this.pokemonLuckText.setTint(getVariantTint(Math.min(luck - 1, 2) as Variant));
this.pokemonLuckLabelText.setVisible(this.pokemonLuckText.visible); this.pokemonLuckLabelText.setVisible(this.pokemonLuckText.visible);
this.pokemonShinyIcon.setVisible(this.pokemonLuckText.visible);
//Growth translate //Growth translate
let growthReadable = Utils.toReadableString(GrowthRate[species.growthRate]); let growthReadable = Utils.toReadableString(GrowthRate[species.growthRate]);
@ -2091,7 +2092,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.pokemonCandyCountText.setVisible(true); this.pokemonCandyCountText.setVisible(true);
this.pokemonFormText.setVisible(true); this.pokemonFormText.setVisible(true);
this.pokemonHatchedIcon.setVisible(true); this.pokemonHatchedIcon.setVisible(true);
this.pokemonShinyIcon.setVisible(true);
this.pokemonHatchedCountText.setVisible(true); this.pokemonHatchedCountText.setVisible(true);
let currentFriendship = this.scene.gameData.starterData[this.lastSpecies.speciesId].friendship; let currentFriendship = this.scene.gameData.starterData[this.lastSpecies.speciesId].friendship;
@ -2173,6 +2173,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.type2Icon.setVisible(false); this.type2Icon.setVisible(false);
this.pokemonLuckLabelText.setVisible(false); this.pokemonLuckLabelText.setVisible(false);
this.pokemonLuckText.setVisible(false); this.pokemonLuckText.setVisible(false);
this.pokemonShinyIcon.setVisible(false);
this.pokemonUncaughtText.setVisible(true); this.pokemonUncaughtText.setVisible(true);
this.pokemonAbilityLabelText.setVisible(false); this.pokemonAbilityLabelText.setVisible(false);
this.pokemonPassiveLabelText.setVisible(false); this.pokemonPassiveLabelText.setVisible(false);
@ -2201,6 +2202,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.type2Icon.setVisible(false); this.type2Icon.setVisible(false);
this.pokemonLuckLabelText.setVisible(false); this.pokemonLuckLabelText.setVisible(false);
this.pokemonLuckText.setVisible(false); this.pokemonLuckText.setVisible(false);
this.pokemonShinyIcon.setVisible(false);
this.pokemonUncaughtText.setVisible(!!species); this.pokemonUncaughtText.setVisible(!!species);
this.pokemonAbilityLabelText.setVisible(false); this.pokemonAbilityLabelText.setVisible(false);
this.pokemonPassiveLabelText.setVisible(false); this.pokemonPassiveLabelText.setVisible(false);