From fec41716f40ed43791fd37071b06e8516d207807 Mon Sep 17 00:00:00 2001 From: NetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com> Date: Sat, 6 May 2023 15:31:25 -0400 Subject: Add Auto, Pet, and Crop Milestones to RPC. (#83) --- src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (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 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, -- cgit