diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-09-23 15:45:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 15:45:56 +0200 |
commit | 74490dcdb619e6eadf1be7665871cdaba4d58ee8 (patch) | |
tree | 2b1cd46ec2b68b09876abadb1f319f856b57e0b2 /src/main/java/at/hannibal2/skyhanni | |
parent | 8edd0070a55d422e6470aaed09ab72d8bc952578 (diff) | |
download | skyhanni-74490dcdb619e6eadf1be7665871cdaba4d58ee8.tar.gz skyhanni-74490dcdb619e6eadf1be7665871cdaba4d58ee8.tar.bz2 skyhanni-74490dcdb619e6eadf1be7665871cdaba4d58ee8.zip |
Backend: Carry Tracker Number format depending on Custom Scoreboard (#2571)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt index f70fa58b8..bfecbc48f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt @@ -7,7 +7,6 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.events.entity.slayer.SlayerDeathEvent -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboardUtils.formatNum import at.hannibal2.skyhanni.features.slayer.SlayerType import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -15,6 +14,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addString import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.KeyboardManager import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble import at.hannibal2.skyhanni.utils.NumberUtil.formatDoubleOrUserError import at.hannibal2.skyhanni.utils.NumberUtil.formatIntOrUserError @@ -181,7 +181,7 @@ object CarryTracker { val price = rawPrice.formatDoubleOrUserError() ?: return carryType.pricePer = price update() - ChatUtils.chat("Set carry price for $carryType §eto §6${price.formatNum()} coins.") + ChatUtils.chat("Set carry price for $carryType §eto §6${price.shortFormat()} coins.") } private fun getCustomer(customerName: String): Customer { @@ -260,7 +260,7 @@ object CarryTracker { val totalCost = customer.carries.sumOf { it.getCost() ?: 0.0 } val totalCostFormat = formatCost(totalCost) if (totalCostFormat != "") { - val paidFormat = "§6${customer.alreadyPaid.formatNum()}" + val paidFormat = "§6${customer.alreadyPaid.shortFormat()}" val missingFormat = formatCost(totalCost - customer.alreadyPaid) list.add( Renderable.clickAndHover( @@ -293,7 +293,7 @@ object CarryTracker { }?.takeIf { it != 0.0 } } - private fun formatCost(totalCost: Double?): String = if (totalCost == 0.0 || totalCost == null) "" else "§6${totalCost.formatNum()}" + private fun formatCost(totalCost: Double?): String = if (totalCost == 0.0 || totalCost == null) "" else "§6${totalCost.shortFormat()}" private fun createCarryType(input: String): CarryType? { if (input.length == 1) return null |