aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorCalMWolfs <cwolfson58@gmail.com>2023-06-20 09:40:29 +1000
committerCalMWolfs <cwolfson58@gmail.com>2023-06-20 09:40:29 +1000
commitde47024ea3f4910bbca68a880491c8924fc5ecc6 (patch)
tree5ddb201d3148fa38e5c4ffb2f4ccf06369f3800e /src/main/java/at/hannibal2
parent917170b1ca53b0718f59a0f922e028567e61c998 (diff)
downloadskyhanni-de47024ea3f4910bbca68a880491c8924fc5ecc6.tar.gz
skyhanni-de47024ea3f4910bbca68a880491c8924fc5ecc6.tar.bz2
skyhanni-de47024ea3f4910bbca68a880491c8924fc5ecc6.zip
hours do have 60 minutes
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt
index 264d16ae4..50c11d128 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt
@@ -28,13 +28,13 @@ class FrozenTreasureTracker {
private var lastEstimatedIce = 0L
private val icePerMin = mutableListOf<Long>()
private var icePerHour = 0
- private var missedMinutes = 0
+ private var stoppedChecks = 0
private var compactPattern = "COMPACT! You found an Enchanted Ice!".toPattern()
private var treasureCount = mapOf<FrozenTreasure, Int>()
init {
- fixedRateTimer(name = "skyhanni-dungeon-milestone-display", period = 60_000) {
+ fixedRateTimer(name = "skyhanni-dungeon-milestone-display", period = 15_000) {
if (!onJerryWorkshop()) return@fixedRateTimer
calculateIcePerHour()
}
@@ -44,17 +44,17 @@ class FrozenTreasureTracker {
val difference = estimatedIce - lastEstimatedIce
lastEstimatedIce = estimatedIce
if (difference == 0L) {
- missedMinutes += 1
- if (missedMinutes == 3) {
- missedMinutes = 0
+ stoppedChecks += 1
+ if (stoppedChecks == 12) {
+ stoppedChecks = 0
icePerMin.clear()
icePerHour = 0
}
return
}
- missedMinutes = 0
+ stoppedChecks = 0
icePerMin.add(difference)
- if (difference != estimatedIce) icePerHour = icePerMin.average().toInt()
+ if (difference != estimatedIce) icePerHour = icePerMin.average().toInt() * 240
}
private fun formatDisplay(map: List<List<Any>>): List<List<Any>> {