From 0b7cf28c3a8cf911ef85f079a49d4a1781e5915f Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Thu, 26 Oct 2023 16:54:45 +0200 Subject: Update: Option to disable chest value in dungeons (#591) Chest value is now default disabled in dungeon, and added an option to enable it. #591 --- .../at/hannibal2/skyhanni/config/features/InventoryConfig.java | 8 +++++++- .../java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java index 8d3c4a56d..9ddaae675 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java @@ -233,11 +233,17 @@ public class InventoryConfig { public static class ChestValueConfig { @Expose - @ConfigOption(name = "Enabled", desc = "Enabled estimated value of chest") + @ConfigOption(name = "Enabled", desc = "Enable estimated value of chest") @ConfigEditorBoolean @FeatureToggle public boolean enabled = false; + @Expose + @ConfigOption(name = "Enabled in dungeons", desc = "Enable the feature in dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enableInDungeons = false; + @Expose @ConfigOption(name = "Show Stacks", desc = "Show the item icon before name.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt index 52d1627d9..52e6d3b8d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt @@ -40,6 +40,7 @@ class ChestValue { @SubscribeEvent fun onBackgroundDraw(event: GuiRenderEvent.ChestGuiOverlayRenderEvent) { if (!isEnabled()) return + if (LorenzUtils.inDungeons && !config.enableInDungeons) return if (InventoryUtils.openInventoryName() == "") return if (inInventory) { config.position.renderStringsAndItems( @@ -274,4 +275,4 @@ class ChestValue { ) private fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled -} \ No newline at end of file +} -- cgit