aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-15 22:38:13 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-15 22:38:13 +0100
commit762cfe41c1317935b9390a759c14aaf197e688f4 (patch)
treeeaa28e0402a567e9c1aa6e98eb33bdfc02a6e5ae /src/main/java/at/hannibal2/skyhanni
parentee7538da5cb41c299794ba04ff3ee43a4cbbf9be (diff)
downloadskyhanni-762cfe41c1317935b9390a759c14aaf197e688f4.tar.gz
skyhanni-762cfe41c1317935b9390a759c14aaf197e688f4.tar.bz2
skyhanni-762cfe41c1317935b9390a759c14aaf197e688f4.zip
Added toggle config.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Features.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Misc.java20
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt1
5 files changed, 28 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java
index 0f3b52c2a..61bdf55a1 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Features.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java
@@ -111,6 +111,11 @@ public class Features extends Config {
editOverlay(activeConfigCategory, 200, 16, bazaar.updateTimerPos);
return;
}
+
+ if (runnableId.equals("crimsonIsleReputationHelper")) {
+ editOverlay(activeConfigCategory, 200, 16, misc.crimsonIsleReputationHelperPos);
+ return;
+ }
}
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
index 58186b08e..9ac1057ed 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
@@ -131,11 +131,6 @@ public class Misc {
public boolean hideBlazeParticles = false;
@Expose
- @ConfigOption(name = "Config Button", desc = "Add a button to the pause menu to configure SkyHanni.")
- @ConfigEditorBoolean
- public boolean configButtonOnPause = true;
-
- @Expose
@ConfigOption(name = "Collection Counter Position", desc = "Tracking the number of items you collect. §cDoes not work with sacks.")
@ConfigEditorButton(runnableId = "collectionCounter", buttonText = "Edit")
public Position collectionCounterPos = new Position(10, 10, false, true);
@@ -144,4 +139,19 @@ public class Misc {
@ConfigOption(name = "Brewing Stand Overlay", desc = "Display the Item names directly inside the Brewing Stand")
@ConfigEditorBoolean
public boolean brewingStandOverlay = true;
+
+ @Expose
+ @ConfigOption(name = "Crimson Isle Reputation", desc = "Enable features around Reputation features in the Crimson Isle")
+ @ConfigEditorBoolean
+ public boolean crimsonIsleReputationHelper = true;
+
+ @Expose
+ @ConfigOption(name = "Collection Counter Position", desc = "Tracking the number of items you collect. §cDoes not work with sacks.")
+ @ConfigEditorButton(runnableId = "crimsonIsleReputationHelper", buttonText = "Edit")
+ public Position crimsonIsleReputationHelperPos = new Position(10, 10, false, true);
+
+ @Expose
+ @ConfigOption(name = "Config Button", desc = "Add a button to the pause menu to configure SkyHanni.")
+ @ConfigEditorBoolean
+ public boolean configButtonOnPause = true;
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
index c86c968d1..cf936c9fb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
@@ -47,6 +47,7 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) {
fun onTick(event: TickEvent.ClientTickEvent) {
if (!HyPixelData.skyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
+ if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
if (dirty) {
dirty = false
updateRender()
@@ -64,11 +65,12 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) {
@SubscribeEvent(priority = EventPriority.LOWEST)
fun renderOverlay(event: RenderGameOverlayEvent.Post) {
if (event.type != RenderGameOverlayEvent.ElementType.ALL) return
+ if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
if (!HyPixelData.skyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
- SkyHanniMod.feature.dev.debugPos.renderStrings(display)
+ SkyHanniMod.feature.misc.crimsonIsleReputationHelperPos.renderStrings(display)
}
fun update() {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
index 463cd3347..f0e6b9fdb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
@@ -34,6 +34,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
fun onTick(event: TickEvent.ClientTickEvent) {
if (!HyPixelData.skyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
+ if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
tick++
if (tick % 20 == 0) {
loader.checkInventory()
@@ -80,6 +81,8 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) {
if (!HyPixelData.skyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
+ if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
+
if (event.gui !is GuiChest) return
val chest = event.gui.inventorySlots as ContainerChest
val chestName = chest.getInventoryName()
@@ -136,6 +139,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
fun onChat(event: LorenzChatEvent) {
if (!HyPixelData.skyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
+ if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
val message = event.message
if (message == "§aYou completed your Dojo quest! Visit the Town Board to claim the rewards.") {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
index 9e72ff2c5..14892dff6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
@@ -30,6 +30,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel
fun onChat(event: LorenzChatEvent) {
if (!HyPixelData.skyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
+ if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
val message = event.message
for (miniBoss in miniBosses) {