aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Garden.java7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt20
2 files changed, 23 insertions, 4 deletions
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
@@ -81,6 +81,13 @@ public class Garden {
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
@ConfigAccordionId(id = 3)
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<EntityLivingBase>) {
if (!SkyHanniMod.feature.garden.visitorColoredName) return