Fix pokedex entry after catching

This commit is contained in:
Wlowscha 2025-03-29 00:16:59 +01:00
parent eb12b8c692
commit 08006138e3
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04
2 changed files with 19 additions and 10 deletions

View File

@ -332,8 +332,8 @@ export class AttemptCapturePhase extends PokemonPhase {
globalScene.ui.setOverlayMode(
Mode.POKEDEX_PAGE,
pokemon.species,
pokemon.formIndex,
attributes,
[pokemon.species.speciesId],
null,
() => {
globalScene.ui.setMode(Mode.MESSAGE).then(() => {

View File

@ -1111,8 +1111,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
});
this.blockInput = false;
} else {
ui.revertMode()
.then(() => {
ui.revertMode().then(() => {
console.log("exitCallback", this.exitCallback);
if (this.exitCallback instanceof Function) {
const exitCallback = this.exitCallback;
@ -1988,6 +1987,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
}
break;
case Button.LEFT:
if (this.filteredIndices && this.filteredIndices.length <= 1) {
ui.playError();
this.blockInput = false;
return true;
}
this.blockInput = true;
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
// Always go back to first selection after scrolling around
@ -2023,6 +2027,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
this.blockInput = false;
break;
case Button.RIGHT:
if (this.filteredIndices && this.filteredIndices.length <= 1) {
ui.playError();
this.blockInput = false;
return true;
}
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
// Always go back to first selection after scrolling around
if (this.previousSpecies.length === 0) {