diff options
author | NetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com> | 2023-05-06 15:31:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-06 21:31:25 +0200 |
commit | fec41716f40ed43791fd37071b06e8516d207807 (patch) | |
tree | d59e894f8a106e4391a745fff48d256dfd18c043 /src/main/java/at/hannibal2/skyhanni/data | |
parent | d462d17308d2ac2754f73a64b61ac343677e0f30 (diff) | |
download | skyhanni-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.kt | 8 |
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, |