aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorLuna <luna@alexia.lol>2024-05-09 00:56:43 +0200
committerGitHub <noreply@github.com>2024-05-09 00:56:43 +0200
commitb9dba99cb4a84aab3d32663103d54f10e8feb841 (patch)
treefaee74ab02cbae05395528ea2920e3d41998aedb /src/main/java/at/hannibal2
parente0b6473a1411ba3509cc5f303d9c1c28caafa4a7 (diff)
downloadskyhanni-b9dba99cb4a84aab3d32663103d54f10e8feb841.tar.gz
skyhanni-b9dba99cb4a84aab3d32663103d54f10e8feb841.tar.bz2
skyhanni-b9dba99cb4a84aab3d32663103d54f10e8feb841.zip
Fix: Visitor timer flickering while farming (#1737)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
index 205085c53..efb19579e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.events.garden.visitor.VisitorArrivalEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
+import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
@@ -154,8 +155,8 @@ class GardenVisitorTimer {
else -> "e"
}
- val extraSpeed = if (diff in 2.seconds..10.seconds) {
- val duration = millis / 3
+ val extraSpeed = if (GardenAPI.isCurrentlyFarming()) {
+ val duration = (millis / 3) * (GardenCropSpeed.getRecentBPS() / 20)
"§7/§$formatColor" + duration.format()
} else ""
if (config.newVisitorPing && millis < 10.seconds) {