diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 19:52:34 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 19:52:34 +0100 |
commit | e032933b55acf5ea894bd20e881bf1fd4cd1b6d7 (patch) | |
tree | 851b0f42db1bc3d6c1e2f4d3fd2100e2f626a183 /src/main/java/at/hannibal2/skyhanni/data | |
parent | 41022a4c79b49e6a1aa861cce666e30f6099eca7 (diff) | |
download | skyhanni-e032933b55acf5ea894bd20e881bf1fd4cd1b6d7.tar.gz skyhanni-e032933b55acf5ea894bd20e881bf1fd4cd1b6d7.tar.bz2 skyhanni-e032933b55acf5ea894bd20e881bf1fd4cd1b6d7.zip |
Added setCounter()
+ Added support for mushroom cow pet perk (Counting and updating mushroom collection when breaking crops with mushroom blocks, added extra gui for time till crop milestones)
+ Added blocks/second display to crop milestone gui and made all crop milestone gui elements customizeable/toggleable
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt index 984c60df7..0e2ed1fef 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt @@ -33,7 +33,7 @@ class GardenCropMilestones { fun onProfileJoin(event: ProfileJoinEvent) { if (cropCounter.isEmpty()) { for (crop in CropType.values()) { - cropCounter[crop] = 0 + crop.setCounter(0) } } } @@ -65,7 +65,7 @@ class GardenCropMilestones { if (matcher.matches()) { val rawNumber = matcher.group(1) val overflow = rawNumber.formatNumber() - cropCounter[crop] = cropForTier + overflow + crop.setCounter(cropForTier + overflow) } next = false } @@ -80,6 +80,8 @@ class GardenCropMilestones { fun CropType.getCounter() = cropCounter[this]!! + fun CropType.setCounter(counter: Long) { cropCounter[this] = counter } + fun getTierForCrops(crops: Long): Int { var tier = 0 var totalCrops = 0L |