mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22: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 isFormGender: boolean;
|
||||
private filteredIndices: Species[] | null = null;
|
||||
private filteredFormIndices: number[] | null = null;
|
||||
|
||||
private availableVariants: number;
|
||||
private unlockedVariants: boolean[];
|
||||
@ -680,6 +681,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
};
|
||||
this.formIndex = this.savedStarterAttributes.form ?? 0;
|
||||
this.filteredIndices = args[2] ?? null;
|
||||
this.filteredFormIndices = args[3] ?? null;
|
||||
this.starterSetup();
|
||||
|
||||
if (args[4] instanceof Function) {
|
||||
@ -696,6 +698,10 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
|
||||
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.menuContainer.setVisible(true);
|
||||
@ -1150,15 +1156,14 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
});
|
||||
this.blockInput = false;
|
||||
} else {
|
||||
ui.revertMode()
|
||||
.then(() => {
|
||||
console.log("exitCallback", this.exitCallback);
|
||||
if (this.exitCallback instanceof Function) {
|
||||
const exitCallback = this.exitCallback;
|
||||
this.exitCallback = null;
|
||||
exitCallback();
|
||||
}
|
||||
});
|
||||
ui.revertMode().then(() => {
|
||||
console.log("exitCallback", this.exitCallback);
|
||||
if (this.exitCallback instanceof Function) {
|
||||
const exitCallback = this.exitCallback;
|
||||
this.exitCallback = null;
|
||||
exitCallback();
|
||||
}
|
||||
});
|
||||
success = true;
|
||||
}
|
||||
} else {
|
||||
@ -2222,8 +2227,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
const ui = this.getUi();
|
||||
|
||||
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]);
|
||||
} else {
|
||||
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));
|
||||
|
||||
if (this.isCaught()) {
|
||||
|
Loading…
Reference in New Issue
Block a user