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) --- .../hannibal2/skyhanni/config/features/Garden.java | 7 +++++++ .../features/garden/visitor/GardenVisitorFeatures.kt | 20 ++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java index 1f5b2a90b..0f6be8749 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -80,6 +80,13 @@ public class Garden { @ConfigAccordionId(id = 3) public boolean visitorNeedsOnlyWhenClose = false; + @Expose + @ConfigOption(name = "Bazaar Alley", desc = "Show the Visitor Items List while inside the Bazaar Alley in the Hub. " + + "This helps buying the correct amount when not having a booster cookie buff active.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean visitorNeedsInBazaarAlley = true; + @Expose @ConfigOption(name = "Show Price", desc = "Show the coin price in the items needed list.") @ConfigEditorBoolean 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