diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 21:33:17 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 21:33:17 +0100 |
commit | 9d2b10c3858dcd4aebe60eb28b982b9b31ce3f21 (patch) | |
tree | cf67a40dbe1fb6c161f0477154777df92a560b92 /src/main/java/at/hannibal2/skyhanni | |
parent | d7066762c7084a00d9f193b67317a3ccf732bca2 (diff) | |
download | skyhanni-9d2b10c3858dcd4aebe60eb28b982b9b31ce3f21.tar.gz skyhanni-9d2b10c3858dcd4aebe60eb28b982b9b31ce3f21.tar.bz2 skyhanni-9d2b10c3858dcd4aebe60eb28b982b9b31ce3f21.zip |
Show the price more compact for money per hour (default disabled)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Garden.java | 7 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java index fa8b7b03a..a782dbd72 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -479,6 +479,13 @@ public class Garden { @ConfigEditorBoolean @ConfigAccordionId(id = 13) public boolean moneyPerHourCompact = false; + @Expose + @ConfigOption( + name = "Compact Price", + desc = "Show the price more compact.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 13) + public boolean moneyPerHourCompactPrice = false; @Expose @ConfigOption(name = "Money per hour Position", desc = "") diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt index 344e36bd3..95cb97c8f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/CropMoneyDisplay.kt @@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc import at.hannibal2.skyhanni.utils.NEUItems +import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.StringUtils.removeColor import io.github.moulberry.notenoughupdates.NotEnoughUpdates @@ -114,7 +115,12 @@ class CropMoneyDisplay { list.add("$currentColor$contestFormat$itemName§7: ") } - val format = LorenzUtils.formatInteger(moneyPerHour.toLong()) + + val format = if (config.moneyPerHourCompactPrice) { + NumberUtil.format(moneyPerHour) + } else { + LorenzUtils.formatInteger(moneyPerHour.toLong()) + } list.add("§6$format") newDisplay.add(list) |