Apply suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Wlowscha 2025-01-30 14:27:33 +01:00 committed by GitHub
parent e893fcc48f
commit d233f70491
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ import { EaseType } from "#enums/ease-type";
import { MoneyFormat } from "#enums/money-format";
import { PlayerGender } from "#enums/player-gender";
import { ShopCursorTarget } from "#enums/shop-cursor-target";
import * as Utils from "../../utils";
import { isLocal } from "#app/utils";
const VOLUME_OPTIONS: SettingOption[] = new Array(11).fill(null).map((_, i) => i ? {
value: (i * 10).toString(),
@ -693,7 +693,7 @@ export const Setting: Array<Setting> = [
}
];
if (Utils.isLocal) {
if (isLocal) {
Setting.push({
key: SettingKeys.Dex_For_Devs,
label: i18next.t("settings:dexForDevs"),

View File

@ -5,7 +5,7 @@ import * as Utils from "../utils";
import i18next from "i18next";
import { globalScene } from "#app/global-scene";
export interface BaseStatsOverlaySettings {
interface BaseStatsOverlaySettings {
scale?:number; // scale the box? A scale of 0.5 is recommended
x?: number;
y?: number;
@ -18,7 +18,7 @@ const BORDER = 8;
const GLOBAL_SCALE = 6;
const shortStats = [ "HP", "ATK", "DEF", "SPATK", "SPDEF", "SPD" ];
export default class BaseStatsOverlay extends Phaser.GameObjects.Container implements InfoToggle {
export class BaseStatsOverlay extends Phaser.GameObjects.Container implements InfoToggle {
public active: boolean = false;
@ -38,7 +38,7 @@ export default class BaseStatsOverlay extends Phaser.GameObjects.Container imple
super(globalScene, options?.x, options?.y);
this.scale = options?.scale || 1; // set up the scale
this.setScale(this.scale);
this.options = options || {};
this.options = options ?? {};
// prepare the description box
this.width = (options?.width || BaseStatsOverlay.getWidth(this.scale)) / this.scale; // divide by scale as we always want this to be half a window wide