aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 588ee9172..31654398e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -138,6 +138,7 @@ class GardenVisitorFeatures {
}
}
if (requiredItems.isNotEmpty()) {
+ var totalPrice = 0.0
newDisplay.addAsSingletonList("§7Visitor items needed:")
for ((internalName, amount) in requiredItems) {
val name = NEUItems.getItemStack(internalName).name!!
@@ -158,12 +159,17 @@ class GardenVisitorFeatures {
if (config.visitorNeedsShowPrice) {
val price = NEUItems.getPrice(internalName) * amount
+ totalPrice += price
val format = NumberUtil.format(price)
list.add(" §7(§6$format§7)")
}
newDisplay.add(list)
}
+ if (totalPrice > 0) {
+ val format = NumberUtil.format(totalPrice)
+ newDisplay[0] = listOf("§7Visitor items needed: §7(§6$format§7)")
+ }
}
if (newVisitors.isNotEmpty()) {
if (requiredItems.isNotEmpty()) {