mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 14:52:19 +02:00
Fix pokedex entry after catching
This commit is contained in:
parent
eb12b8c692
commit
08006138e3
@ -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(() => {
|
||||
|
@ -1111,15 +1111,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 {
|
||||
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user