diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | FEATURES.md | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Garden.java | 8 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt | 11 |
4 files changed, 19 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f510da7..2b98a586b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ + Added **Money per Hour** - Displays the money per hour YOU get with YOUR crop/minute value when selling the items to bazaar. + Added farming contest timer. + Added wrong fungi cutter mode warning. ++ Added show the price per garden experience inside the visitor gui. ### Features from other Mods diff --git a/FEATURES.md b/FEATURES.md index 7284cabf2..206f1a0b7 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -186,6 +186,7 @@ + **Money per Hour** - Displays the money per hour YOU get with YOUR crop/minute value when selling the items to bazaar. + Farming contest timer. + Wrong fungi cutter mode warning. ++ Show the price per garden experience inside the visitor gui. ## Commands - /wiki (using hypixel-skyblock.fandom.com instead of Hypixel wiki) 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 75f934584..bfa578547 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -97,12 +97,18 @@ public class Garden { public boolean visitorExactAmountAndTime = true; @Expose - @ConfigOption(name = "Copper Price", desc = "Show the price for copper inside the visitor gui.") + @ConfigOption(name = "Copper Price", desc = "Show the price per copper inside the visitor gui.") @ConfigEditorBoolean @ConfigAccordionId(id = 4) public boolean visitorCopperPrice = false; @Expose + @ConfigOption(name = "Experience Price", desc = "Show the price per garden experience inside the visitor gui.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 4) + public boolean visitorExperiencePrice = false; + + @Expose @ConfigOption(name = "Notification Chat", desc = "Show in chat when a new visitor is visiting your island.") @ConfigEditorBoolean @ConfigAccordionId(id = 1) 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 fb08d212c..85b311c10 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt @@ -34,6 +34,7 @@ class GardenVisitorFeatures { private var onBarnPlot = false private var tick = 0 private val copperPattern = Pattern.compile(" §8\\+§c(.*) Copper") + private val gardenExperiencePattern = Pattern.compile(" §8\\+§2(.*) §7Garden Experience") private val offerAcceptedPattern = Pattern.compile("§6§lOFFER ACCEPTED §r§8with §r(.*) §r.*") private val config get() = SkyHanniMod.feature.garden @@ -256,7 +257,15 @@ class GardenVisitorFeatures { if (matcher.matches()) { val coppers = matcher.group(1).replace(",", "").toInt() val pricePerCopper = NumberUtil.format((totalPrice / coppers).toInt()) - list[i + itemsWithSpeedCounter] = "$line §7(Copper price §6$pricePerCopper§7)" + list[i + itemsWithSpeedCounter] = "$line §7(price per §6$pricePerCopper§7)" + } + } + if (config.visitorExperiencePrice) { + val matcher = gardenExperiencePattern.matcher(line) + if (matcher.matches()) { + val gardenExp = matcher.group(1).replace(",", "").toInt() + val pricePerCopper = NumberUtil.format((totalPrice / gardenExp).toInt()) + list[i + itemsWithSpeedCounter] = "$line §7(price per §6$pricePerCopper§7)" } } } |