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(
|
globalScene.ui.setOverlayMode(
|
||||||
Mode.POKEDEX_PAGE,
|
Mode.POKEDEX_PAGE,
|
||||||
pokemon.species,
|
pokemon.species,
|
||||||
pokemon.formIndex,
|
|
||||||
attributes,
|
attributes,
|
||||||
|
[pokemon.species.speciesId],
|
||||||
null,
|
null,
|
||||||
() => {
|
() => {
|
||||||
globalScene.ui.setMode(Mode.MESSAGE).then(() => {
|
globalScene.ui.setMode(Mode.MESSAGE).then(() => {
|
||||||
|
@ -1111,15 +1111,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 {
|
||||||
@ -1988,6 +1987,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.LEFT:
|
case Button.LEFT:
|
||||||
|
if (this.filteredIndices && this.filteredIndices.length <= 1) {
|
||||||
|
ui.playError();
|
||||||
|
this.blockInput = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
this.blockInput = true;
|
this.blockInput = true;
|
||||||
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
|
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
|
||||||
// Always go back to first selection after scrolling around
|
// Always go back to first selection after scrolling around
|
||||||
@ -2023,6 +2027,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.blockInput = false;
|
this.blockInput = false;
|
||||||
break;
|
break;
|
||||||
case Button.RIGHT:
|
case Button.RIGHT:
|
||||||
|
if (this.filteredIndices && this.filteredIndices.length <= 1) {
|
||||||
|
ui.playError();
|
||||||
|
this.blockInput = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
|
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
|
||||||
// Always go back to first selection after scrolling around
|
// Always go back to first selection after scrolling around
|
||||||
if (this.previousSpecies.length === 0) {
|
if (this.previousSpecies.length === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user