mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-28 11:12:24 +02:00
No error messag when cursor on uncaught species, showing sprite again after toggling stats
This commit is contained in:
parent
fcc9ec57d3
commit
b3bda1aaac
@ -183,9 +183,6 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
private infoOverlay : PokedexInfoOverlay;
|
||||
|
||||
private statsMode: boolean;
|
||||
private starterIconsCursorXOffset: number = -3;
|
||||
private starterIconsCursorYOffset: number = 1;
|
||||
private starterIconsCursorIndex: number;
|
||||
|
||||
private allSpecies: PokemonSpecies[] = [];
|
||||
private lastSpecies: PokemonSpecies;
|
||||
@ -2374,7 +2371,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
} else {
|
||||
this.statsMode = false;
|
||||
this.statsContainer.setVisible(false);
|
||||
this.pokemonSprite.setVisible(!!this.speciesStarterDexEntry?.caughtAttr);
|
||||
this.pokemonSprite.setVisible(true);
|
||||
//@ts-ignore
|
||||
this.statsContainer.updateIvs(null); // TODO: resolve ts-ignore. !?!?
|
||||
}
|
||||
|
@ -1776,7 +1776,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
}
|
||||
|
||||
setSpeciesDetails(species: PokemonSpecies, options: SpeciesDetails = {}): void {
|
||||
let { shiny, formIndex, female, variant, abilityIndex, natureIndex } = options;
|
||||
let { shiny, formIndex, female, variant } = options;
|
||||
const forSeen: boolean = options.forSeen ?? false;
|
||||
this.dexAttrCursor = 0n;
|
||||
this.abilityCursor = -1;
|
||||
@ -1811,8 +1811,6 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
|
||||
if (!dexEntry.caughtAttr) {
|
||||
const props = this.getSanitizedProps(this.scene.gameData.getSpeciesDexAttrProps(species, this.getCurrentDexProps(species.speciesId)));
|
||||
const defaultAbilityIndex = this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species);
|
||||
const defaultNature = this.scene.gameData.getSpeciesDefaultNature(species);
|
||||
|
||||
if (shiny === undefined || shiny !== props.shiny) {
|
||||
shiny = props.shiny;
|
||||
@ -1826,12 +1824,6 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
if (variant === undefined || variant !== props.variant) {
|
||||
variant = props.variant;
|
||||
}
|
||||
if (abilityIndex === undefined || abilityIndex !== defaultAbilityIndex) {
|
||||
abilityIndex = defaultAbilityIndex;
|
||||
}
|
||||
if (natureIndex === undefined || natureIndex !== defaultNature) {
|
||||
natureIndex = defaultNature;
|
||||
}
|
||||
}
|
||||
|
||||
if (forSeen ? this.speciesStarterDexEntry?.seenAttr : this.speciesStarterDexEntry?.caughtAttr) {
|
||||
|
Loading…
Reference in New Issue
Block a user