aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorNetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com>2023-05-06 15:31:25 -0400
committerGitHub <noreply@github.com>2023-05-06 21:31:25 +0200
commitfec41716f40ed43791fd37071b06e8516d207807 (patch)
treed59e894f8a106e4391a745fff48d256dfd18c043 /src/main/java/at/hannibal2/skyhanni/data
parentd462d17308d2ac2754f73a64b61ac343677e0f30 (diff)
downloadskyhanni-fec41716f40ed43791fd37071b06e8516d207807.tar.gz
skyhanni-fec41716f40ed43791fd37071b06e8516d207807.tar.bz2
skyhanni-fec41716f40ed43791fd37071b06e8516d207807.zip
Add Auto, Pet, and Crop Milestones to RPC. (#83)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt
index d07172609..da7f0b05b 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt
@@ -93,6 +93,14 @@ class GardenCropMilestones {
return 0
}
+ fun CropType.progressToNextLevel(): Double {
+ val progress = getCounter()
+ val startTier = getTierForCrops(progress)
+ val startCrops = getCropsForTier(startTier)
+ val end = getCropsForTier(startTier + 1).toDouble()
+ return (progress - startCrops) / (end - startCrops)
+ }
+
// TODO use repo
private val cropMilestone = listOf(
100,