From 2b8f46cf6beb18e7c7e96e83e74b7ce510ca1152 Mon Sep 17 00:00:00 2001 From: zoton2 Date: Sun, 10 Dec 2023 23:09:10 +0100 Subject: [PATCH] =?UTF-8?q?Metako=20being=20picky=20=F0=9F=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/omnibar/components/Total.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/graphics/omnibar/components/Total.vue b/src/graphics/omnibar/components/Total.vue index e3b76c2c..778a3efd 100644 --- a/src/graphics/omnibar/components/Total.vue +++ b/src/graphics/omnibar/components/Total.vue @@ -154,10 +154,12 @@ export default class extends Vue { } get totalStr(): string { - let val = this.total; // "Reset" value every 10k, specific to ESA Legends 2023. - if (nodecg.bundleConfig.event.shorts === 'esal23') val = this.total % 10000; - return `$${Math.floor(val).toLocaleString('en-US', { maximumFractionDigits: 0 })}`; + const esal23 = nodecg.bundleConfig.event.shorts === 'esal23'; + return `$${Math.floor(esal23 ? this.total % 10000 : this.total).toLocaleString('en-US', { + maximumFractionDigits: 0, + minimumIntegerDigits: esal23 && this.total >= 10000 ? 4 : undefined, + })}`; } async playNextAlert(start = false): Promise {