diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-28 00:41:28 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-28 00:41:28 +0200 |
commit | d9a3a0c7fff65ed911b2777223ffe57602bd7552 (patch) | |
tree | 0e18be4c23cf38081741300bcecacf930c3bf60f | |
parent | d40f64e8a3bf305c016e9c16f73a93723b0254b2 (diff) | |
download | skyhanni-d9a3a0c7fff65ed911b2777223ffe57602bd7552.tar.gz skyhanni-d9a3a0c7fff65ed911b2777223ffe57602bd7552.tar.bz2 skyhanni-d9a3a0c7fff65ed911b2777223ffe57602bd7552.zip |
Added option to show show the exact total price in estimated item value
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Misc.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt | 10 |
3 files changed, 15 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d867043a9..9668e7dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ ### Changes + Option to show the yaw and pitch display outside garden or while not holding a farming tool (Contributed by CalMWolfs) + Added wizard warp as diana waypoint ++ Added option to show exact prices in estimated item value ### Fixes + Fixed Pocket Sack-In-A-Sack Replace in lore diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java index 8d15a46df..497190529 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java @@ -240,6 +240,12 @@ public class Misc { public boolean estimatedIemValueAlwaysEnabled = true; @Expose + @ConfigOption(name = "Show Exact Price", desc = "Show the exact total price instead of the compact number.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 11) + public boolean estimatedIemValueExactPrice = false; + + @Expose @ConfigOption(name = "Show Armor Value", desc = "Show the value of the full armor in the wardrobe inventory.") @ConfigEditorBoolean @ConfigAccordionId(id = 11) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt index b52320c2e..2fbc0eca2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt @@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NumberUtil +import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAbilityScrolls import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getArmorDye @@ -117,7 +118,12 @@ object EstimatedItemValue { if (basePrice == totalPrice) return listOf() - list.add("§aTotal: §6§l" + NumberUtil.format(totalPrice)) + val numberFormat = if (config.estimatedIemValueExactPrice) { + totalPrice.addSeparators() + } else { + NumberUtil.format(totalPrice) + } + list.add("§aTotal: §6§l$numberFormat") val newDisplay = mutableListOf<List<Any>>() for (line in list) { @@ -300,7 +306,7 @@ object EstimatedItemValue { } private fun addTransmissionTuners(stack: ItemStack, list: MutableList<String>): Double { - val count = stack.getTransmissionTunerCount() ?: return 0.0 + val count = stack.getTransmissionTunerCount() ?: return 0.0 val wtfHardcodedTuner = "TRANSMISSION_TUNER" val price = NEUItems.getPrice(wtfHardcodedTuner) * count |