Revert "[QoL] Add red color to the quantity if the item is at it's held limit…" (#2178)
This reverts commit 048993b2c2
.
This commit is contained in:
parent
0e794fe2fc
commit
855ceda192
|
@ -1,7 +1,7 @@
|
||||||
import { CommandPhase, SelectModifierPhase } from "../phases";
|
import { CommandPhase, SelectModifierPhase } from "../phases";
|
||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
import { PlayerPokemon, PokemonMove } from "../field/pokemon";
|
import { PlayerPokemon, PokemonMove } from "../field/pokemon";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "./text";
|
import { addTextObject, TextStyle } from "./text";
|
||||||
import { Command } from "./command-ui-handler";
|
import { Command } from "./command-ui-handler";
|
||||||
import MessageUiHandler from "./message-ui-handler";
|
import MessageUiHandler from "./message-ui-handler";
|
||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
|
@ -20,7 +20,6 @@ import {Button} from "../enums/buttons";
|
||||||
import { applyChallenges, ChallengeType } from "#app/data/challenge.js";
|
import { applyChallenges, ChallengeType } from "#app/data/challenge.js";
|
||||||
import MoveInfoOverlay from "./move-info-overlay";
|
import MoveInfoOverlay from "./move-info-overlay";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
|
||||||
|
|
||||||
const defaultMessage = "Choose a Pokémon.";
|
const defaultMessage = "Choose a Pokémon.";
|
||||||
|
|
||||||
|
@ -801,7 +800,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||||
optionEndIndex = this.options.length;
|
optionEndIndex = this.options.length;
|
||||||
|
|
||||||
let widestOptionWidth = 0;
|
let widestOptionWidth = 0;
|
||||||
const optionTexts: BBCodeText[] = [];
|
const optionTexts: Phaser.GameObjects.Text[] = [];
|
||||||
|
|
||||||
for (let o = optionStartIndex; o < optionEndIndex; o++) {
|
for (let o = optionStartIndex; o < optionEndIndex; o++) {
|
||||||
const option = this.options[this.options.length - (o + 1)];
|
const option = this.options[this.options.length - (o + 1)];
|
||||||
|
@ -846,31 +845,20 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||||
} else {
|
} else {
|
||||||
const itemModifier = itemModifiers[option];
|
const itemModifier = itemModifiers[option];
|
||||||
optionName = itemModifier.type.name;
|
optionName = itemModifier.type.name;
|
||||||
|
/** For every item that has stack bigger than 1, display the current quantity selection */
|
||||||
|
if (this.transferQuantitiesMax[option] > 1) {
|
||||||
|
optionName += ` (${this.transferQuantities[option]})`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const yCoord = -6 - 16 * o;
|
const yCoord = -6 - 16 * o;
|
||||||
const optionText = addBBCodeTextObject(this.scene, 0, yCoord - 16, optionName, TextStyle.WINDOW, { maxLines: 1 });
|
const optionText = addTextObject(this.scene, 0, yCoord - 16, optionName, TextStyle.WINDOW);
|
||||||
if (altText) {
|
if (altText) {
|
||||||
optionText.setColor("#40c8f8");
|
optionText.setColor("#40c8f8");
|
||||||
optionText.setShadowColor("#006090");
|
optionText.setShadowColor("#006090");
|
||||||
}
|
}
|
||||||
optionText.setOrigin(0, 0);
|
optionText.setOrigin(0, 0);
|
||||||
|
|
||||||
/** For every item that has stack bigger than 1, display the current quantity selection */
|
|
||||||
if (this.partyUiMode === PartyUiMode.MODIFIER_TRANSFER && this.transferQuantitiesMax[option] > 1) {
|
|
||||||
const itemModifier = itemModifiers[option];
|
|
||||||
let amountText = ` (${this.transferQuantities[option]})`;
|
|
||||||
|
|
||||||
/** If the amount held is the maximum, display the count in red */
|
|
||||||
if (this.transferQuantitiesMax[option] === itemModifier.getMaxHeldItemCount(this.scene.getParty()[0])) {
|
|
||||||
amountText = `[color=${getTextColor(TextStyle.SUMMARY_RED)}]${amountText}[/color]`;
|
|
||||||
}
|
|
||||||
|
|
||||||
optionText.setText(optionName + amountText);
|
|
||||||
}
|
|
||||||
|
|
||||||
optionText.setText(`[shadow]${optionText.text}[/shadow]`);
|
|
||||||
|
|
||||||
optionTexts.push(optionText);
|
optionTexts.push(optionText);
|
||||||
|
|
||||||
widestOptionWidth = Math.max(optionText.displayWidth, widestOptionWidth);
|
widestOptionWidth = Math.max(optionText.displayWidth, widestOptionWidth);
|
||||||
|
|
Loading…
Reference in New Issue