aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/features/mining
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-02-09 12:00:50 +0100
committerLinnea Gräf <nea@nea.moe>2024-02-09 12:00:50 +0100
commitefbef712130048e1bf39e66b15271bf663586eee (patch)
tree5260c953cdb3825128d43323a7de6557561cb7af /src/main/kotlin/moe/nea/firmament/features/mining
parent0cb6e308acc313a22f9fd796cc47301272485120 (diff)
downloadfirmament-efbef712130048e1bf39e66b15271bf663586eee.tar.gz
firmament-efbef712130048e1bf39e66b15271bf663586eee.tar.bz2
firmament-efbef712130048e1bf39e66b15271bf663586eee.zip
Fix crash when rendering SkyBlock id in a string
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features/mining')
-rw-r--r--src/main/kotlin/moe/nea/firmament/features/mining/PristineProfitTracker.kt10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/mining/PristineProfitTracker.kt b/src/main/kotlin/moe/nea/firmament/features/mining/PristineProfitTracker.kt
index 294c835..ddda5a5 100644
--- a/src/main/kotlin/moe/nea/firmament/features/mining/PristineProfitTracker.kt
+++ b/src/main/kotlin/moe/nea/firmament/features/mining/PristineProfitTracker.kt
@@ -97,15 +97,9 @@ object PristineProfitTracker : FirmamentFeature {
val moneyPerSecond = moneyHistogram.averagePer({ it }, 1.seconds)
if (collectionPerSecond == null || moneyPerSecond == null) return
ProfitHud.collectionCurrent = collectionPerSecond
- ProfitHud.collectionText = Text.translatable(
- "firmament.pristine-profit.collection",
- formatCurrency(collectionPerSecond * SECONDS_PER_HOUR, 1)
- ).formattedString()
+ ProfitHud.collectionText = Text.stringifiedTranslatable("firmament.pristine-profit.collection", formatCurrency(collectionPerSecond * SECONDS_PER_HOUR, 1)).formattedString()
ProfitHud.moneyCurrent = moneyPerSecond
- ProfitHud.moneyText = Text.translatable(
- "firmament.pristine-profit.money",
- formatCurrency(moneyPerSecond * SECONDS_PER_HOUR, 1)
- ).formattedString()
+ ProfitHud.moneyText = Text.stringifiedTranslatable("firmament.pristine-profit.money", formatCurrency(moneyPerSecond * SECONDS_PER_HOUR, 1)).formattedString()
val data = DConfig.data
if (data != null) {
if (data.maxCollectionPerSecond < collectionPerSecond && collectionHistogram.oldestUpdate()