From e8ba3f796180f45a393f334f891483a0387d808c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ricardo=20Fleury=20Oliveira?= Date: Sat, 18 May 2024 17:39:13 -0300 Subject: [PATCH] german changes pt2 --- src/ui/starter-select-ui-handler.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 5dd7e6e82ce..56d481e064f 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1308,25 +1308,29 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.classicWinIcons[s].setVisible(slotVisible && this.scene.gameData.starterData[speciesId].classicWinCount > 0); if (!starterColors[speciesId]) { - starterColors[speciesId] = [ 'ffffff', 'ffffff' ]; // Default to white if no colors are found + // Default to white if no colors are found + starterColors[speciesId] = [ 'ffffff', 'ffffff' ]; } // Set the candy colors this.candyUpgradeIcon[s].setTint(argbFromRgba(Utils.rgbHexToRgba(starterColors[speciesId][0]))); this.candyUpgradeOverlayIcon[s].setTint(argbFromRgba(Utils.rgbHexToRgba(starterColors[speciesId][1]))); - if (this.scene.candyUpgradeIconsMode == 0) { // 'Off' mode + // 'Off' mode + if (this.scene.candyUpgradeIconsMode == 0) { this.candyUpgradeIcon[s].setVisible(false); this.candyUpgradeOverlayIcon[s].setVisible(false); - } else if (this.scene.candyUpgradeIconsMode == 1) { // 'Only Passive Unlocks' mode + // 'Only Passive Unlocks' mode + } else if (this.scene.candyUpgradeIconsMode == 1) { this.candyUpgradeIcon[s].setVisible( slotVisible && ( this.scene.gameData.starterData[speciesId].candyCount >= getPassiveCandyCount(speciesStarters[speciesId]) && !(this.scene.gameData.starterData[speciesId].passiveAttr & PassiveAttr.UNLOCKED))); this.candyUpgradeOverlayIcon[s].setVisible(slotVisible && this.candyUpgradeIcon[s].visible); - } else if (this.scene.candyUpgradeIconsMode == 2) { // 'On' mode + // 'On' mode + } else if (this.scene.candyUpgradeIconsMode == 2) { this.candyUpgradeIcon[s].setVisible( slotVisible && ( (this.scene.gameData.starterData[speciesId].candyCount >= getPassiveCandyCount(speciesStarters[speciesId]) && @@ -1823,15 +1827,18 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const speciesId = this.genSpecies[this.getGenCursorWithScroll()][cursor].speciesId; switch (this.scene.candyUpgradeIconsMode) { - case 0: // 'Off' mode + // 'Off' mode + case 0: return - case 1: // 'Only Passive Unlocks' mode + // 'Only Passive Unlocks' mode + case 1: this.candyUpgradeIcon[cursor].setVisible(this.scene.gameData.starterData[speciesId].candyCount >= getPassiveCandyCount(speciesStarters[speciesId]) && !(this.scene.gameData.starterData[speciesId].passiveAttr & PassiveAttr.UNLOCKED)); this.candyUpgradeOverlayIcon[cursor].setVisible(this.candyUpgradeIcon[cursor].visible); return; - case 2: // 'On' mode + // 'On' mode + case 2: this.candyUpgradeIcon[cursor].setVisible( (this.scene.gameData.starterData[speciesId].candyCount >= getPassiveCandyCount(speciesStarters[speciesId]) && !(this.scene.gameData.starterData[speciesId].passiveAttr & PassiveAttr.UNLOCKED)) || (this.scene.gameData.starterData[speciesId].candyCount >= getValueReductionCandyCounts(speciesStarters[speciesId])[this.scene.gameData.starterData[speciesId].valueReduction]) &&