aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-17 17:19:21 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-17 17:19:21 +0200
commitd690012793ff683a54edbc857b37dae7f657ef6a (patch)
treea6761c748da79210de58ae281cfc2d3b261aca2f
parenta403ad6d485d55e10da244e3ac824fc311f103cc (diff)
downloadskyhanni-d690012793ff683a54edbc857b37dae7f657ef6a.tar.gz
skyhanni-d690012793ff683a54edbc857b37dae7f657ef6a.tar.bz2
skyhanni-d690012793ff683a54edbc857b37dae7f657ef6a.zip
Added click support for the missing visitor items display while inside signs (fill the item amount into the bazaar)
-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