aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-23 20:07:36 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-23 20:07:36 +0100
commit19cbeabc2a7eff5e5c4ccef0cbe6404ad6d1abba (patch)
tree4f7234c3db6039771a71a7636df22dfd089a4e69 /src/main/java/at/hannibal2/skyhanni/features/garden
parent9e16ac756bbeadad01eb247ae4c220bf1f4001f4 (diff)
downloadskyhanni-19cbeabc2a7eff5e5c4ccef0cbe6404ad6d1abba.tar.gz
skyhanni-19cbeabc2a7eff5e5c4ccef0cbe6404ad6d1abba.tar.bz2
skyhanni-19cbeabc2a7eff5e5c4ccef0cbe6404ad6d1abba.zip
Added the coin price in the visitor items needed list
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
index 1e0be2855..ddbdcc997 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
@@ -114,7 +114,19 @@ class GardenVisitorFeatures {
for ((internalName, amount) in requiredItems) {
val name = NEUItems.getItemStack(internalName).name
val itemStack = NEUItems.getItemStack(internalName)
- newDisplay.add(listOf(" §7- ", itemStack, "$name §8x$amount"))
+
+ val list = mutableListOf<Any>()
+ list.add(" §7- ")
+ list.add(itemStack)
+ list.add("$name §8x$amount")
+
+ if (config.visitorNeedsShowPrice) {
+ val price = NEUItems.getPrice(internalName) * amount
+ val format = NumberUtil.format(price)
+ list.add(" §7(§6$format§7)")
+ }
+
+ newDisplay.add(list)
}
}
if (newVisitors.isNotEmpty()) {
@@ -209,11 +221,6 @@ class GardenVisitorFeatures {
var internalName: String
try {
internalName = NEUItems.getInternalName(itemName)
- // This fixes a NEU bug with §9Hay Bale (cosmetic item)
- // TODO remove workaround when this is fixed in neu
- if (internalName == "HAY_BALE") {
- internalName = "HAY_BLOCK"
- }
} catch (e: NullPointerException) {
val message = "internal name is null: '$itemName'"
println(message)