From 203e13852bc1a35431e9f4633b4d1163ca378d96 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sun, 29 Jun 2025 20:25:35 -0700 Subject: [PATCH] Apply Biome --- src/ui/pokedex-info-overlay.ts | 1 - src/ui/pokedex-page-ui-handler.ts | 28 +++++++++++++++++++++------- src/ui/pokedex-ui-handler.ts | 12 +++++++++--- src/ui/starter-select-ui-handler.ts | 16 ++++++++++++---- src/ui/text.ts | 20 ++++++++++---------- 5 files changed, 52 insertions(+), 25 deletions(-) diff --git a/src/ui/pokedex-info-overlay.ts b/src/ui/pokedex-info-overlay.ts index 62ab1190bde..dca5f9b7b31 100644 --- a/src/ui/pokedex-info-overlay.ts +++ b/src/ui/pokedex-info-overlay.ts @@ -2,7 +2,6 @@ import type { InfoToggle } from "../battle-scene"; import { TextStyle, addTextObject } from "./text"; import { addWindow } from "./ui-theme"; import { fixedInt } from "#app/utils/common"; -import i18next from "i18next"; import { globalScene } from "#app/global-scene"; export interface PokedexInfoOverlaySettings { diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index ff187cde3e9..aceddb6995a 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -398,9 +398,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.pokemonLuckLabelText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonLuckLabelText); - this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.LUCK_VALUE, { - fontSize: "56px", - }); + this.pokemonLuckText = addTextObject( + 8 + this.pokemonLuckLabelText.displayWidth + 2, + 89, + "0", + TextStyle.LUCK_VALUE, + { + fontSize: "56px", + }, + ); this.pokemonLuckText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonLuckText); @@ -584,9 +590,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler { this.showBackSpriteIconElement.setName("show-backSprite-icon-element"); this.showBackSpriteIconElement.setScale(0.675); this.showBackSpriteIconElement.setOrigin(0.0, 0.0); - this.showBackSpriteLabel = addTextObject(60, 7, i18next.t("pokedexUiHandler:showBackSprite"), TextStyle.INSTRUCTIONS_TEXT, { - fontSize: instructionTextSize, - }); + this.showBackSpriteLabel = addTextObject( + 60, + 7, + i18next.t("pokedexUiHandler:showBackSprite"), + TextStyle.INSTRUCTIONS_TEXT, + { + fontSize: instructionTextSize, + }, + ); this.showBackSpriteLabel.setName("show-backSprite-label"); this.starterSelectContainer.add(this.showBackSpriteIconElement); this.starterSelectContainer.add(this.showBackSpriteLabel); @@ -2507,7 +2519,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler { const isFormSeen = this.isSeen(); 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.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true), ); diff --git a/src/ui/pokedex-ui-handler.ts b/src/ui/pokedex-ui-handler.ts index 7487a526934..e47af51c8b1 100644 --- a/src/ui/pokedex-ui-handler.ts +++ b/src/ui/pokedex-ui-handler.ts @@ -588,9 +588,15 @@ export default class PokedexUiHandler extends MessageUiHandler { this.showFormTrayIconElement.setName("sprite-showFormTray-icon-element"); this.showFormTrayIconElement.setScale(0.675); this.showFormTrayIconElement.setOrigin(0.0, 0.0); - this.showFormTrayLabel = addTextObject(16, 168, i18next.t("pokedexUiHandler:showForms"), TextStyle.INSTRUCTIONS_TEXT, { - fontSize: instructionTextSize, - }); + this.showFormTrayLabel = addTextObject( + 16, + 168, + i18next.t("pokedexUiHandler:showForms"), + TextStyle.INSTRUCTIONS_TEXT, + { + fontSize: instructionTextSize, + }, + ); this.showFormTrayLabel.setName("text-showFormTray-label"); this.showFormTrayIconElement.setVisible(false); this.showFormTrayLabel.setVisible(false); diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 156177004ed..659159705d9 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -869,9 +869,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonLuckLabelText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonLuckLabelText); - this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.LUCK_VALUE, { - fontSize: "56px", - }); + this.pokemonLuckText = addTextObject( + 8 + this.pokemonLuckLabelText.displayWidth + 2, + 89, + "0", + TextStyle.LUCK_VALUE, + { + fontSize: "56px", + }, + ); this.pokemonLuckText.setOrigin(0, 0); 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.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.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true), ); diff --git a/src/ui/text.ts b/src/ui/text.ts index c2c905a172f..6d5dcb70fb5 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -208,27 +208,27 @@ export function getTextStyleOptions( // shadowYpos = 5; // break; case TextStyle.SUMMARY_DEX_NUM: { - let fontSizeLabel = "96px"; + const fontSizeLabel = "96px"; switch (lang) { case "ja": - styleOptions.padding = { top: 2, bottom: 10 }; + styleOptions.padding = { top: 2, bottom: 10 }; break; } styleOptions.fontSize = fontSizeLabel; - shadowXpos = 5; - shadowYpos = 5; + shadowXpos = 5; + shadowYpos = 5; break; } case TextStyle.SUMMARY_DEX_NUM_GOLD: { - let fontSizeLabel = "96px"; + const fontSizeLabel = "96px"; switch (lang) { case "ja": - styleOptions.padding = { top: 2, bottom: 10 }; + styleOptions.padding = { top: 2, bottom: 10 }; break; } styleOptions.fontSize = fontSizeLabel; - shadowXpos = 5; - shadowYpos = 5; + shadowXpos = 5; + shadowYpos = 5; break; } case TextStyle.SUMMARY_ALT: @@ -250,7 +250,7 @@ export function getTextStyleOptions( shadowYpos = 3; break; case TextStyle.LUCK_VALUE: { - let fontSizeLabel = "96px"; + const fontSizeLabel = "96px"; switch (lang) { case "ja": styleOptions.padding = { top: -6, bottom: 2 }; @@ -431,7 +431,7 @@ export function getTextStyleOptions( shadowXpos = 3; shadowYpos = 3; break; - } + } case TextStyle.MOVE_LABEL: { switch (lang) { case "ja":