Apply Biome

This commit is contained in:
NightKev 2025-06-29 20:25:35 -07:00
parent d0fe23d5ef
commit 203e13852b
5 changed files with 52 additions and 25 deletions

View File

@ -2,7 +2,6 @@ import type { InfoToggle } from "../battle-scene";
import { TextStyle, addTextObject } from "./text"; import { TextStyle, addTextObject } from "./text";
import { addWindow } from "./ui-theme"; import { addWindow } from "./ui-theme";
import { fixedInt } from "#app/utils/common"; import { fixedInt } from "#app/utils/common";
import i18next from "i18next";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
export interface PokedexInfoOverlaySettings { export interface PokedexInfoOverlaySettings {

View File

@ -398,9 +398,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
this.pokemonLuckLabelText.setOrigin(0, 0); this.pokemonLuckLabelText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonLuckLabelText); this.starterSelectContainer.add(this.pokemonLuckLabelText);
this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.LUCK_VALUE, { this.pokemonLuckText = addTextObject(
fontSize: "56px", 8 + this.pokemonLuckLabelText.displayWidth + 2,
}); 89,
"0",
TextStyle.LUCK_VALUE,
{
fontSize: "56px",
},
);
this.pokemonLuckText.setOrigin(0, 0); this.pokemonLuckText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonLuckText); this.starterSelectContainer.add(this.pokemonLuckText);
@ -584,9 +590,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
this.showBackSpriteIconElement.setName("show-backSprite-icon-element"); this.showBackSpriteIconElement.setName("show-backSprite-icon-element");
this.showBackSpriteIconElement.setScale(0.675); this.showBackSpriteIconElement.setScale(0.675);
this.showBackSpriteIconElement.setOrigin(0.0, 0.0); this.showBackSpriteIconElement.setOrigin(0.0, 0.0);
this.showBackSpriteLabel = addTextObject(60, 7, i18next.t("pokedexUiHandler:showBackSprite"), TextStyle.INSTRUCTIONS_TEXT, { this.showBackSpriteLabel = addTextObject(
fontSize: instructionTextSize, 60,
}); 7,
i18next.t("pokedexUiHandler:showBackSprite"),
TextStyle.INSTRUCTIONS_TEXT,
{
fontSize: instructionTextSize,
},
);
this.showBackSpriteLabel.setName("show-backSprite-label"); this.showBackSpriteLabel.setName("show-backSprite-label");
this.starterSelectContainer.add(this.showBackSpriteIconElement); this.starterSelectContainer.add(this.showBackSpriteIconElement);
this.starterSelectContainer.add(this.showBackSpriteLabel); this.starterSelectContainer.add(this.showBackSpriteLabel);
@ -2507,7 +2519,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
const isFormSeen = this.isSeen(); const isFormSeen = this.isSeen();
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default? this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
this.pokemonNumberText.setColor(this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false)); this.pokemonNumberText.setColor(
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false),
);
this.pokemonNumberText.setShadowColor( this.pokemonNumberText.setShadowColor(
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true), this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
); );

View File

@ -588,9 +588,15 @@ export default class PokedexUiHandler extends MessageUiHandler {
this.showFormTrayIconElement.setName("sprite-showFormTray-icon-element"); this.showFormTrayIconElement.setName("sprite-showFormTray-icon-element");
this.showFormTrayIconElement.setScale(0.675); this.showFormTrayIconElement.setScale(0.675);
this.showFormTrayIconElement.setOrigin(0.0, 0.0); this.showFormTrayIconElement.setOrigin(0.0, 0.0);
this.showFormTrayLabel = addTextObject(16, 168, i18next.t("pokedexUiHandler:showForms"), TextStyle.INSTRUCTIONS_TEXT, { this.showFormTrayLabel = addTextObject(
fontSize: instructionTextSize, 16,
}); 168,
i18next.t("pokedexUiHandler:showForms"),
TextStyle.INSTRUCTIONS_TEXT,
{
fontSize: instructionTextSize,
},
);
this.showFormTrayLabel.setName("text-showFormTray-label"); this.showFormTrayLabel.setName("text-showFormTray-label");
this.showFormTrayIconElement.setVisible(false); this.showFormTrayIconElement.setVisible(false);
this.showFormTrayLabel.setVisible(false); this.showFormTrayLabel.setVisible(false);

View File

@ -869,9 +869,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.pokemonLuckLabelText.setOrigin(0, 0); this.pokemonLuckLabelText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonLuckLabelText); this.starterSelectContainer.add(this.pokemonLuckLabelText);
this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.LUCK_VALUE, { this.pokemonLuckText = addTextObject(
fontSize: "56px", 8 + this.pokemonLuckLabelText.displayWidth + 2,
}); 89,
"0",
TextStyle.LUCK_VALUE,
{
fontSize: "56px",
},
);
this.pokemonLuckText.setOrigin(0, 0); this.pokemonLuckText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonLuckText); this.starterSelectContainer.add(this.pokemonLuckText);
@ -3818,7 +3824,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
} }
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default? this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
this.pokemonNumberText.setColor(this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false)); this.pokemonNumberText.setColor(
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false),
);
this.pokemonNumberText.setShadowColor( this.pokemonNumberText.setShadowColor(
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true), this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
); );

View File

@ -208,27 +208,27 @@ export function getTextStyleOptions(
// shadowYpos = 5; // shadowYpos = 5;
// break; // break;
case TextStyle.SUMMARY_DEX_NUM: { case TextStyle.SUMMARY_DEX_NUM: {
let fontSizeLabel = "96px"; const fontSizeLabel = "96px";
switch (lang) { switch (lang) {
case "ja": case "ja":
styleOptions.padding = { top: 2, bottom: 10 }; styleOptions.padding = { top: 2, bottom: 10 };
break; break;
} }
styleOptions.fontSize = fontSizeLabel; styleOptions.fontSize = fontSizeLabel;
shadowXpos = 5; shadowXpos = 5;
shadowYpos = 5; shadowYpos = 5;
break; break;
} }
case TextStyle.SUMMARY_DEX_NUM_GOLD: { case TextStyle.SUMMARY_DEX_NUM_GOLD: {
let fontSizeLabel = "96px"; const fontSizeLabel = "96px";
switch (lang) { switch (lang) {
case "ja": case "ja":
styleOptions.padding = { top: 2, bottom: 10 }; styleOptions.padding = { top: 2, bottom: 10 };
break; break;
} }
styleOptions.fontSize = fontSizeLabel; styleOptions.fontSize = fontSizeLabel;
shadowXpos = 5; shadowXpos = 5;
shadowYpos = 5; shadowYpos = 5;
break; break;
} }
case TextStyle.SUMMARY_ALT: case TextStyle.SUMMARY_ALT:
@ -250,7 +250,7 @@ export function getTextStyleOptions(
shadowYpos = 3; shadowYpos = 3;
break; break;
case TextStyle.LUCK_VALUE: { case TextStyle.LUCK_VALUE: {
let fontSizeLabel = "96px"; const fontSizeLabel = "96px";
switch (lang) { switch (lang) {
case "ja": case "ja":
styleOptions.padding = { top: -6, bottom: 2 }; styleOptions.padding = { top: -6, bottom: 2 };
@ -431,7 +431,7 @@ export function getTextStyleOptions(
shadowXpos = 3; shadowXpos = 3;
shadowYpos = 3; shadowYpos = 3;
break; break;
} }
case TextStyle.MOVE_LABEL: { case TextStyle.MOVE_LABEL: {
switch (lang) { switch (lang) {
case "ja": case "ja":