aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-03 17:07:30 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-03 17:07:30 +0200
commit55aee2c8793c03cf3ba8539535c83897d694ee60 (patch)
treeb0d85e2bf7bf7a83bb9baf067ec1c8337b207d95 /src/main/java/at/hannibal2/skyhanni
parent4aa469feee9592c6c7ded467216c77f5839e7f2e (diff)
downloadskyhanni-55aee2c8793c03cf3ba8539535c83897d694ee60.tar.gz
skyhanni-55aee2c8793c03cf3ba8539535c83897d694ee60.tar.bz2
skyhanni-55aee2c8793c03cf3ba8539535c83897d694ee60.zip
Added option to only show the reputation helper while pressing a hotkey.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt20
2 files changed, 30 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java
index e04404ed8..a1741affb 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java
@@ -112,6 +112,19 @@ public class MiscConfig {
public boolean crimsonIsleReputationHelper = true;
@Expose
+ @ConfigOption(name = "Use Hotkey", desc = "Only show the reputation helper while pressing the hotkey.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 6)
+ public boolean reputationHelperUseHotkey = false;
+
+ @Expose
+ @ConfigOption(name = "Hotkey", desc = "Press this hotkey to show the reputation helper.")
+ @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
+ @ConfigAccordionId(id = 6)
+ public int reputationHelperHotkey = Keyboard.KEY_NONE;
+
+
+ @Expose
public Position crimsonIsleReputationHelperPos = new Position(10, 10, false, true);
@Expose
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 012570add..2efc657bf 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
@@ -18,8 +18,10 @@ import at.hannibal2.skyhanni.utils.TabListData
import com.google.gson.JsonObject
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import org.lwjgl.input.Keyboard
class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) {
+ val config get() = SkyHanniMod.feature.misc
val questHelper = DailyQuestHelper(this)
val miniBossHelper = DailyMiniBossHelper(this)
@@ -62,7 +64,10 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) {
fun onTick(event: LorenzTickEvent) {
if (!LorenzUtils.inSkyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
- if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
+ if (!config.crimsonIsleReputationHelper) return
+ if (!dirty && display.isEmpty()) {
+ dirty = true
+ }
if (dirty) {
dirty = false
updateRender()
@@ -101,12 +106,21 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) {
@SubscribeEvent(priority = EventPriority.LOWEST)
fun renderOverlay(event: GuiRenderEvent.GameOverlayRenderEvent) {
- if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return
+ if (!config.crimsonIsleReputationHelper) return
if (!LorenzUtils.inSkyBlock) return
if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
- SkyHanniMod.feature.misc.crimsonIsleReputationHelperPos.renderStringsAndItems(display, posLabel = "Crimson Isle Reputation Helper")
+ if (config.reputationHelperUseHotkey) {
+ if (!Keyboard.isKeyDown(config.reputationHelperHotkey)) {
+ return
+ }
+ }
+
+ config.crimsonIsleReputationHelperPos.renderStringsAndItems(
+ display,
+ posLabel = "Crimson Isle Reputation Helper"
+ )
}
fun update() {