mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 23:32:19 +02:00
Adding canUseCandies option to dex, setting temporarily to false.
This commit is contained in:
parent
9701f27c63
commit
c59e06956d
@ -250,6 +250,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
private availableVariants: number;
|
||||
private unlockedVariants: boolean[];
|
||||
|
||||
private canUseCandies: boolean;
|
||||
|
||||
constructor() {
|
||||
super(Mode.POKEDEX_PAGE);
|
||||
}
|
||||
@ -556,6 +558,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
|
||||
show(args: any[]): boolean {
|
||||
|
||||
this.canUseCandies = false;
|
||||
|
||||
if (args.length >= 1 && args[0] === "refresh") {
|
||||
return false;
|
||||
} else {
|
||||
@ -1626,7 +1630,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
}
|
||||
break;
|
||||
case Button.STATS:
|
||||
if (!isCaught || !isFormCaught) {
|
||||
if (!isCaught || !isFormCaught || !this.canUseCandies) {
|
||||
error = true;
|
||||
} else {
|
||||
const ui = this.getUi();
|
||||
@ -1888,7 +1892,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
|
||||
if (this.isCaught()) {
|
||||
if (isFormCaught) {
|
||||
if (this.canUseCandies) {
|
||||
this.updateButtonIcon(SettingKeyboard.Button_Stats, gamepadType, this.candyUpgradeIconElement, this.candyUpgradeLabel);
|
||||
}
|
||||
if (this.canCycleShiny) {
|
||||
this.updateButtonIcon(SettingKeyboard.Button_Cycle_Shiny, gamepadType, this.shinyIconElement, this.shinyLabel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user