aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-05-07 20:40:51 +1000
committerGitHub <noreply@github.com>2024-05-07 12:40:51 +0200
commitb6c1b883a7edc7f519eddc776fa6ccfdd520d0dc (patch)
treeea0d25888f117fd5b667eb32644bc7d6430083c5 /src/main/java
parentd4209779c44b45c3677f925752c1726d34a2421d (diff)
downloadskyhanni-b6c1b883a7edc7f519eddc776fa6ccfdd520d0dc.tar.gz
skyhanni-b6c1b883a7edc7f519eddc776fa6ccfdd520d0dc.tar.bz2
skyhanni-b6c1b883a7edc7f519eddc776fa6ccfdd520d0dc.zip
Fix: showing time to upgrade when maxed (#1727)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt
index 7eabb2420..f5e308924 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt
@@ -359,7 +359,8 @@ object ChocolateFactoryDataLoader {
val profileStorage = profileStorage ?: return
// removing time tower here as people like to determine when to buy it themselves
- val notMaxed = list.filter { !it.isMaxed && it.slotIndex != ChocolateFactoryAPI.timeTowerIndex }
+ val notMaxed =
+ list.filter { !it.isMaxed && it.slotIndex != ChocolateFactoryAPI.timeTowerIndex && it.effectiveCost != null }
val bestUpgrade = notMaxed.minByOrNull { it.effectiveCost ?: Double.MAX_VALUE }
profileStorage.bestUpgradeAvailableAt = bestUpgrade?.canAffordAt?.toMillis() ?: 0
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt
index cb16bd823..892a96e46 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt
@@ -155,7 +155,9 @@ object ChocolateFactoryStats {
TIME_TO_PRESTIGE("§eTime To Prestige: §b1d 13h 59m 4s", { ChocolateFactoryAPI.currentPrestige != 5 }),
RAW_PER_SECOND("§eRaw Per Second: §62,136"),
CHOCOLATE_UNTIL_PRESTIGE("§eChocolate To Prestige: §65,851", { ChocolateFactoryAPI.currentPrestige != 5 }),
- TIME_TO_BEST_UPGRADE("§eBest Upgrade: §b 59m 4s"),
+ TIME_TO_BEST_UPGRADE(
+ "§eBest Upgrade: §b 59m 4s",
+ { ChocolateFactoryAPI.profileStorage?.bestUpgradeCost != 0L }),
;
override fun toString(): String {