aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-10 21:42:19 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-10 21:42:19 +0200
commit03367368988c5191456e20cc5f48db81532d071a (patch)
treeebd7f1fd575446460450a20912fb2797a8094eca
parentd347b3fdd33bd72033329e92353561e5c60d2657 (diff)
downloadskyhanni-03367368988c5191456e20cc5f48db81532d071a.tar.gz
skyhanni-03367368988c5191456e20cc5f48db81532d071a.tar.bz2
skyhanni-03367368988c5191456e20cc5f48db81532d071a.zip
Fixed average crop milestone sometimes not correct
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt
index 5faaac281..6f16e3f53 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneAverage.kt
@@ -23,7 +23,7 @@ class GardenCropMilestoneAverage {
val tier = GardenCropMilestones.getTierForCrops(counter)
tiers.add(tier.toDouble())
}
- average = tiers.average().round(2)
+ average = (tiers.sum() / CropType.values().size).round(2)
}
@SubscribeEvent