mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 06:42:20 +02:00
Changed visibility of icons in main Pokédex page
This commit is contained in:
parent
bfedea8769
commit
df22ea7d90
@ -782,6 +782,15 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
|
this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isSeen(species: PokemonSpecies, dexEntry: DexEntry): boolean {
|
||||||
|
if (dexEntry?.seenAttr) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
|
||||||
|
return !!starterDexEntry?.caughtAttr;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if 'Icon' based upgrade notifications should be shown
|
* Determines if 'Icon' based upgrade notifications should be shown
|
||||||
* @returns true if upgrade notifications are enabled and set to display an 'Icon'
|
* @returns true if upgrade notifications are enabled and set to display an 'Icon'
|
||||||
@ -1736,7 +1745,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
if (caughtAttr & data.species.getFullUnlocksData() || globalScene.dexForDevs) {
|
if (caughtAttr & data.species.getFullUnlocksData() || globalScene.dexForDevs) {
|
||||||
container.icon.clearTint();
|
container.icon.clearTint();
|
||||||
} else if (dexEntry.seenAttr) {
|
} else if (this.isSeen(data.species, dexEntry)) {
|
||||||
container.icon.setTint(0x808080);
|
container.icon.setTint(0x808080);
|
||||||
} else {
|
} else {
|
||||||
container.icon.setTint(0);
|
container.icon.setTint(0);
|
||||||
@ -1927,13 +1936,11 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
const props = this.getSanitizedProps(globalScene.gameData.getSpeciesDexAttrProps(this.lastSpecies, dexAttr));
|
const props = this.getSanitizedProps(globalScene.gameData.getSpeciesDexAttrProps(this.lastSpecies, dexAttr));
|
||||||
|
|
||||||
this.trayContainers = [];
|
this.trayContainers = [];
|
||||||
|
const isFormSeen = this.isSeen(species, dexEntry);
|
||||||
this.trayForms.map((f, index) => {
|
this.trayForms.map((f, index) => {
|
||||||
const isFormCaught = dexEntry
|
const isFormCaught = dexEntry
|
||||||
? (dexEntry.caughtAttr & species.getFullUnlocksData() & globalScene.gameData.getFormAttr(f.formIndex ?? 0)) > 0n
|
? (dexEntry.caughtAttr & species.getFullUnlocksData() & globalScene.gameData.getFormAttr(f.formIndex ?? 0)) > 0n
|
||||||
: false;
|
: false;
|
||||||
const isFormSeen = dexEntry
|
|
||||||
? (dexEntry.seenAttr & globalScene.gameData.getFormAttr(f.formIndex ?? 0)) > 0n
|
|
||||||
: false;
|
|
||||||
const formContainer = new PokedexMonContainer(species, {
|
const formContainer = new PokedexMonContainer(species, {
|
||||||
formIndex: f.formIndex,
|
formIndex: f.formIndex,
|
||||||
female: props.female,
|
female: props.female,
|
||||||
@ -2143,7 +2150,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isFormCaught = dexEntry ? (caughtAttr & globalScene.gameData.getFormAttr(formIndex ?? 0)) > 0n : false;
|
const isFormCaught = dexEntry ? (caughtAttr & globalScene.gameData.getFormAttr(formIndex ?? 0)) > 0n : false;
|
||||||
const isFormSeen = dexEntry ? (dexEntry.seenAttr & globalScene.gameData.getFormAttr(formIndex ?? 0)) > 0n : false;
|
const isFormSeen = this.isSeen(species, dexEntry);
|
||||||
|
|
||||||
const assetLoadCancelled = new BooleanHolder(false);
|
const assetLoadCancelled = new BooleanHolder(false);
|
||||||
this.assetLoadCancelled = assetLoadCancelled;
|
this.assetLoadCancelled = assetLoadCancelled;
|
||||||
|
Loading…
Reference in New Issue
Block a user