diff --git a/src/data/projInfo.json b/src/data/projInfo.json index 69ff3eb..28be7d1 100644 --- a/src/data/projInfo.json +++ b/src/data/projInfo.json @@ -9,7 +9,7 @@ "versionTitle": "Initial Commit", "allowGoBack": true, - "allowSmall": false, + "defaultShowSmall": false, "defaultDecimalsShown": 2, "useHeader": true, "banner": null, diff --git a/src/features/resources/resource.ts b/src/features/resources/resource.ts index c1f956a..46984e2 100644 --- a/src/features/resources/resource.ts +++ b/src/features/resources/resource.ts @@ -6,14 +6,14 @@ import { State, persistent } from "@/game/persistence"; export interface Resource extends Ref { displayName: string; precision: number; - small: boolean; + small?: boolean; } export function createResource( defaultValue: T | Ref, displayName = "points", precision = 0, - small = false + small = undefined ): Resource { const resource: Partial> = persistent(defaultValue); resource.displayName = displayName; diff --git a/src/util/break_eternity.ts b/src/util/break_eternity.ts index 08500cf..a4c9328 100644 --- a/src/util/break_eternity.ts +++ b/src/util/break_eternity.ts @@ -64,7 +64,7 @@ const thousandth = new Decimal(0.001); const zero = new Decimal(0); export function format(num: DecimalSource, precision?: number, small?: boolean): string { if (precision == null) precision = projInfo.defaultDecimalsShown; - small = small || projInfo.allowSmall; + small = small ?? projInfo.defaultShowSmall; num = new Decimal(num); if (isNaN(num.sign) || isNaN(num.layer) || isNaN(num.mag)) { return "NaN";