From 159ac2beb9e282d2f697d520bcf322b3fb10a17a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sun, 12 May 2024 12:11:07 +0200 Subject: Fix: Chocolate Factory Time Tower math (#1774) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/inventory/chocolatefactory/ChocolateFactoryAPI.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt index 7418f3b39..0148141a6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt @@ -13,7 +13,6 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NumberUtil.formatLong -import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.SkyblockSeason import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.matches @@ -150,8 +149,6 @@ object ChocolateFactoryAPI { var needed = goal val profileStorage = profileStorage ?: return Duration.ZERO - val updatedAgo = SimpleTimeMark(profileStorage.lastDataSave).passedSince().inWholeSeconds - val baseMultiplier = profileStorage.rawChocolateMultiplier val rawChocolatePerSecond = profileStorage.rawChocPerSecond val timeTowerMultiplier = baseMultiplier + profileStorage.timeTowerLevel * 0.1 @@ -164,7 +161,7 @@ object ChocolateFactoryAPI { val secondsAtRate = needed / timeTowerChocPerSecond if (secondsAtRate < secondsUntilTowerExpires) { - return secondsAtRate.seconds - updatedAgo.seconds + return secondsAtRate.seconds } needed -= (secondsUntilTowerExpires * timeTowerChocPerSecond).toLong() -- cgit