mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Compare commits
1 Commits
2089ebd8ea
...
b7263d90f1
Author | SHA1 | Date | |
---|---|---|---|
|
b7263d90f1 |
@ -410,11 +410,6 @@ export class PokedexUiHandler extends MessageUiHandler {
|
|||||||
new DropDownLabel(i18next.t("filterBar:hasHiddenAbility"), undefined, DropDownState.ON),
|
new DropDownLabel(i18next.t("filterBar:hasHiddenAbility"), undefined, DropDownState.ON),
|
||||||
new DropDownLabel(i18next.t("filterBar:noHiddenAbility"), undefined, DropDownState.EXCLUDE),
|
new DropDownLabel(i18next.t("filterBar:noHiddenAbility"), undefined, DropDownState.EXCLUDE),
|
||||||
];
|
];
|
||||||
const seenSpeciesLabels = [
|
|
||||||
new DropDownLabel(i18next.t("filterBar:seenSpecies"), undefined, DropDownState.OFF),
|
|
||||||
new DropDownLabel(i18next.t("filterBar:isSeen"), undefined, DropDownState.ON),
|
|
||||||
new DropDownLabel(i18next.t("filterBar:isUnseen"), undefined, DropDownState.EXCLUDE),
|
|
||||||
];
|
|
||||||
const eggLabels = [
|
const eggLabels = [
|
||||||
new DropDownLabel(i18next.t("filterBar:egg"), undefined, DropDownState.OFF),
|
new DropDownLabel(i18next.t("filterBar:egg"), undefined, DropDownState.OFF),
|
||||||
new DropDownLabel(i18next.t("filterBar:eggPurchasable"), undefined, DropDownState.ON),
|
new DropDownLabel(i18next.t("filterBar:eggPurchasable"), undefined, DropDownState.ON),
|
||||||
@ -428,7 +423,6 @@ export class PokedexUiHandler extends MessageUiHandler {
|
|||||||
new DropDownOption("FAVORITE", favoriteLabels),
|
new DropDownOption("FAVORITE", favoriteLabels),
|
||||||
new DropDownOption("WIN", winLabels),
|
new DropDownOption("WIN", winLabels),
|
||||||
new DropDownOption("HIDDEN_ABILITY", hiddenAbilityLabels),
|
new DropDownOption("HIDDEN_ABILITY", hiddenAbilityLabels),
|
||||||
new DropDownOption("SEEN_SPECIES", seenSpeciesLabels),
|
|
||||||
new DropDownOption("EGG", eggLabels),
|
new DropDownOption("EGG", eggLabels),
|
||||||
new DropDownOption("POKERUS", pokerusLabels),
|
new DropDownOption("POKERUS", pokerusLabels),
|
||||||
];
|
];
|
||||||
@ -798,16 +792,14 @@ export class PokedexUiHandler extends MessageUiHandler {
|
|||||||
this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
|
this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
isSeen(species: PokemonSpecies, dexEntry: DexEntry, seenFilter?: boolean): boolean {
|
isSeen(species: PokemonSpecies, dexEntry: DexEntry): boolean {
|
||||||
if (dexEntry?.seenAttr) {
|
if (dexEntry?.seenAttr) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!seenFilter) {
|
|
||||||
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
|
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
|
||||||
return !!starterDexEntry?.caughtAttr;
|
return !!starterDexEntry?.caughtAttr;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if 'Icon' based upgrade notifications should be shown
|
* Determines if 'Icon' based upgrade notifications should be shown
|
||||||
@ -1625,21 +1617,6 @@ export class PokedexUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Seen Filter
|
|
||||||
const dexEntry = globalScene.gameData.dexData[species.speciesId];
|
|
||||||
const isItSeen = this.isSeen(species, dexEntry, true);
|
|
||||||
const fitsSeen = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
|
|
||||||
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.ON) {
|
|
||||||
return isItSeen;
|
|
||||||
}
|
|
||||||
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.EXCLUDE) {
|
|
||||||
return !isItSeen;
|
|
||||||
}
|
|
||||||
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.OFF) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Egg Purchasable Filter
|
// Egg Purchasable Filter
|
||||||
const isEggPurchasable = this.isSameSpeciesEggAvailable(species.speciesId);
|
const isEggPurchasable = this.isSameSpeciesEggAvailable(species.speciesId);
|
||||||
const fitsEgg = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
|
const fitsEgg = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
|
||||||
@ -1681,7 +1658,6 @@ export class PokedexUiHandler extends MessageUiHandler {
|
|||||||
fitsFavorite &&
|
fitsFavorite &&
|
||||||
fitsWin &&
|
fitsWin &&
|
||||||
fitsHA &&
|
fitsHA &&
|
||||||
fitsSeen &&
|
|
||||||
fitsEgg &&
|
fitsEgg &&
|
||||||
fitsPokerus
|
fitsPokerus
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user