From 19cbeabc2a7eff5e5c4ccef0cbe6404ad6d1abba Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 23 Mar 2023 20:07:36 +0100 Subject: Added the coin price in the visitor items needed list --- .../skyhanni/features/garden/GardenVisitorFeatures.kt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden') 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() + 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) -- cgit