From 51034de598456e966c0b045d76a7364084085dc9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 28 Feb 2023 17:41:38 +0100 Subject: Added crops per minute and time until next milestone to the crop milestone display. Added best crop display. This shows you what crop gives you the fastest garden exp or skyblock exp. --- .../skyhanni/data/GardenCropMilestones.kt | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt index 291b11b81..f38bea5d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CropMilestoneUpdateEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent @@ -29,18 +30,18 @@ class GardenCropMilestones { @SubscribeEvent fun onProfileJoin(event: ProfileJoinEvent) { - cropCounter.clear() - - cropCounter["Wheat"] = 0 - cropCounter["Carrot"] = 0 - cropCounter["Potato"] = 0 - cropCounter["Pumpkin"] = 0 - cropCounter["Sugar Cane"] = 0 - cropCounter["Melon"] = 0 - cropCounter["Cactus"] = 0 - cropCounter["Cocoa Beans"] = 0 - cropCounter["Mushroom"] = 0 - cropCounter["Nether Wart"] = 0 + if (cropCounter.isEmpty()) { + cropCounter["Wheat"] = 0 + cropCounter["Carrot"] = 0 + cropCounter["Potato"] = 0 + cropCounter["Pumpkin"] = 0 + cropCounter["Sugar Cane"] = 0 + cropCounter["Melon"] = 0 + cropCounter["Cactus"] = 0 + cropCounter["Cocoa Beans"] = 0 + cropCounter["Mushroom"] = 0 + cropCounter["Nether Wart"] = 0 + } } @SubscribeEvent @@ -80,7 +81,7 @@ class GardenCropMilestones { } companion object { - val cropCounter = mutableMapOf() + val cropCounter: MutableMap get() = SkyHanniMod.feature.hidden.gardenCropCounter fun getTierForCrops(crops: Long): Int { var tier = 0 -- cgit