mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 23:02:19 +02:00
Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
bdf6dede04
commit
97f0a1e221
@ -2026,7 +2026,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.LEFT:
|
case Button.LEFT:
|
||||||
if (this.filteredIndices && this.filteredIndices.length <= 1) {
|
if (this.filteredIndices?.length <= 1) {
|
||||||
ui.playError();
|
ui.playError();
|
||||||
this.blockInput = false;
|
this.blockInput = false;
|
||||||
return true;
|
return true;
|
||||||
@ -2066,7 +2066,7 @@ 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) {
|
if (this.filteredIndices?.length <= 1) {
|
||||||
ui.playError();
|
ui.playError();
|
||||||
this.blockInput = false;
|
this.blockInput = false;
|
||||||
return true;
|
return true;
|
||||||
@ -2230,10 +2230,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
const ui = this.getUi();
|
const ui = this.getUi();
|
||||||
|
|
||||||
const isFormCaught = this.isFormCaught();
|
|
||||||
const isSeen = this.isSeen();
|
|
||||||
|
|
||||||
if ((this.isCaught() && isFormCaught) || isSeen) {
|
if ((this.isCaught() && this.isFormCaught()) || this.isSeen()) {
|
||||||
ui.showText(this.menuDescriptions[cursor]);
|
ui.showText(this.menuDescriptions[cursor]);
|
||||||
} else {
|
} else {
|
||||||
ui.showText("");
|
ui.showText("");
|
||||||
|
Loading…
Reference in New Issue
Block a user