From d690012793ff683a54edbc857b37dae7f657ef6a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 17 Apr 2023 17:19:21 +0200 Subject: Added click support for the missing visitor items display while inside signs (fill the item amount into the bazaar) --- .../features/garden/visitor/GardenVisitorFeatures.kt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 7f7b4967e..74990d8a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -560,16 +560,28 @@ class GardenVisitorFeatures { @SubscribeEvent fun onRenderOverlay(event: GuiRenderEvent) { - if (!GardenAPI.inGarden()) return if (!config.visitorNeedsDisplay) return - if (config.visitorNeedsOnlyWhenClose && !GardenAPI.onBarnPlot) return - - if (!GardenAPI.hideExtraGuis()) { + if (showGui()) { config.visitorNeedsPos.renderStringsAndItems(display, posLabel = "Visitor Items Needed") } } + private fun showGui(): Boolean { + if (config.visitorNeedsInBazaarAlley) { + if (LorenzUtils.skyBlockIsland == IslandType.HUB && LorenzUtils.skyBlockArea == "Bazaar Alley") { + return true + } + } + + if (GardenAPI.hideExtraGuis()) return false + if (GardenAPI.inGarden()) { + if (GardenAPI.onBarnPlot) return true + if (!config.visitorNeedsOnlyWhenClose) return true + } + return false + } + @SubscribeEvent(priority = EventPriority.HIGH) fun onRenderLiving(event: RenderLivingEvent.Specials.Pre) { if (!SkyHanniMod.feature.garden.visitorColoredName) return -- cgit