mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 23:02:19 +02:00
Fixed isSeen in page handler
This commit is contained in:
parent
c3b97b244d
commit
2e2f61ff5d
@ -257,6 +257,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
private menuDescriptions: string[];
|
private menuDescriptions: string[];
|
||||||
private isFormGender: boolean;
|
private isFormGender: boolean;
|
||||||
private filteredIndices: Species[] | null = null;
|
private filteredIndices: Species[] | null = null;
|
||||||
|
private filteredFormIndices: number[] | null = null;
|
||||||
|
|
||||||
private availableVariants: number;
|
private availableVariants: number;
|
||||||
private unlockedVariants: boolean[];
|
private unlockedVariants: boolean[];
|
||||||
@ -680,6 +681,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
};
|
};
|
||||||
this.formIndex = this.savedStarterAttributes.form ?? 0;
|
this.formIndex = this.savedStarterAttributes.form ?? 0;
|
||||||
this.filteredIndices = args[2] ?? null;
|
this.filteredIndices = args[2] ?? null;
|
||||||
|
this.filteredFormIndices = args[3] ?? null;
|
||||||
this.starterSetup();
|
this.starterSetup();
|
||||||
|
|
||||||
if (args[4] instanceof Function) {
|
if (args[4] instanceof Function) {
|
||||||
@ -696,6 +698,10 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
this.starterAttributes = this.initStarterPrefs();
|
this.starterAttributes = this.initStarterPrefs();
|
||||||
|
|
||||||
|
console.log(this.filteredIndices);
|
||||||
|
console.log(this.savedStarterAttributes);
|
||||||
|
console.log(this.starterAttributes);
|
||||||
|
|
||||||
this.menuOptions = Utils.getEnumKeys(MenuOptions).map(m => Number.parseInt(MenuOptions[m]) as MenuOptions);
|
this.menuOptions = Utils.getEnumKeys(MenuOptions).map(m => Number.parseInt(MenuOptions[m]) as MenuOptions);
|
||||||
|
|
||||||
this.menuContainer.setVisible(true);
|
this.menuContainer.setVisible(true);
|
||||||
@ -1150,15 +1156,14 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
});
|
});
|
||||||
this.blockInput = false;
|
this.blockInput = false;
|
||||||
} else {
|
} else {
|
||||||
ui.revertMode()
|
ui.revertMode().then(() => {
|
||||||
.then(() => {
|
console.log("exitCallback", this.exitCallback);
|
||||||
console.log("exitCallback", this.exitCallback);
|
if (this.exitCallback instanceof Function) {
|
||||||
if (this.exitCallback instanceof Function) {
|
const exitCallback = this.exitCallback;
|
||||||
const exitCallback = this.exitCallback;
|
this.exitCallback = null;
|
||||||
this.exitCallback = null;
|
exitCallback();
|
||||||
exitCallback();
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2222,8 +2227,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
const ui = this.getUi();
|
const ui = this.getUi();
|
||||||
|
|
||||||
const isFormCaught = this.isFormCaught();
|
const isFormCaught = this.isFormCaught();
|
||||||
|
const isSeen = this.isSeen();
|
||||||
|
|
||||||
if ((this.isCaught() && isFormCaught) || (this.speciesStarterDexEntry?.seenAttr && cursor === 5)) {
|
if ((this.isCaught() && isFormCaught) || isSeen) {
|
||||||
ui.showText(this.menuDescriptions[cursor]);
|
ui.showText(this.menuDescriptions[cursor]);
|
||||||
} else {
|
} else {
|
||||||
ui.showText("");
|
ui.showText("");
|
||||||
@ -2302,7 +2308,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (species && (this.speciesStarterDexEntry?.seenAttr || this.isCaught())) {
|
if (species && (this.isSeen() || this.isCaught())) {
|
||||||
this.pokemonNumberText.setText(padInt(species.speciesId, 4));
|
this.pokemonNumberText.setText(padInt(species.speciesId, 4));
|
||||||
|
|
||||||
if (this.isCaught()) {
|
if (this.isCaught()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user