diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-05-12 12:11:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-12 12:11:07 +0200 |
commit | 159ac2beb9e282d2f697d520bcf322b3fb10a17a (patch) | |
tree | 80a263f844af927e2630c270cc0fd3983b2655f0 /src/main/java/at/hannibal2 | |
parent | 324b694fad1c6ca46ecb5d032d5d8b8a43751b48 (diff) | |
download | skyhanni-159ac2beb9e282d2f697d520bcf322b3fb10a17a.tar.gz skyhanni-159ac2beb9e282d2f697d520bcf322b3fb10a17a.tar.bz2 skyhanni-159ac2beb9e282d2f697d520bcf322b3fb10a17a.zip |
Fix: Chocolate Factory Time Tower math (#1774)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt | 5 |
1 files changed, 1 insertions, 4 deletions
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() |