From 16cf25f52fcfe6666d6dea09cf67b2871cfb3e07 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 23 Dec 2023 02:58:12 +0100 Subject: Fixed armor drop tracker not instantly visible. --- .../skyhanni/features/garden/farming/ArmorDropTracker.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt index f3fac8d2d..64b4c12ce 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt @@ -1,9 +1,11 @@ package at.hannibal2.skyhanni.features.garden.farming import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator +import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.jsonobjects.repo.ArmorDropsJson import at.hannibal2.skyhanni.data.jsonobjects.repo.ArmorDropsJson.DropInfo import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.PreProfileSwitchEvent @@ -88,6 +90,13 @@ object ArmorDropTracker { tracker.renderDisplay(config.pos) } + @SubscribeEvent + fun onIslandChange(event: IslandChangeEvent) { + if (event.newIsland == IslandType.GARDEN) { + tracker.firstUpdate() + } + } + @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!GardenAPI.inGarden()) return -- cgit