mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-28 11:12:24 +02:00
Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
e893fcc48f
commit
d233f70491
@ -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"),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user