From b9dba99cb4a84aab3d32663103d54f10e8feb841 Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 9 May 2024 00:56:43 +0200 Subject: Fix: Visitor timer flickering while farming (#1737) --- .../hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt | 5 +++-- 1 file 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) { -- cgit