diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-23 12:27:47 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-23 12:27:47 +0200 |
commit | 03548be42728e1056743b4ae1ef1313d8a9c9bf7 (patch) | |
tree | c5c64206e18dd6dfdd01c3a04fad85244fa4065e /src/main/java/at/hannibal2 | |
parent | 16741e3cc412cebff9bf1a02c444dfb85fd213e8 (diff) | |
download | skyhanni-03548be42728e1056743b4ae1ef1313d8a9c9bf7.tar.gz skyhanni-03548be42728e1056743b4ae1ef1313d8a9c9bf7.tar.bz2 skyhanni-03548be42728e1056743b4ae1ef1313d8a9c9bf7.zip |
Option to show reputation locations only when pressing the hotkey
Diffstat (limited to 'src/main/java/at/hannibal2')
5 files changed, 12 insertions, 6 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 00364cf17..00a85b441 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -140,10 +140,10 @@ public class MiscConfig { public Position crimsonIsleReputationHelperPos = new Position(10, 10, false, true); @Expose - @ConfigOption(name = "Reputation Locations", desc = "Crimson Isles waypoints for locations to get reputation.") - @ConfigEditorBoolean + @ConfigOption(name = "Show Locations", desc = "Crimson Isles waypoints for locations to get reputation.") + @ConfigEditorDropdown(values = {"Always", "Only With Hotkey", "Never"}) @ConfigAccordionId(id = 6) - public boolean crimsonIsleReputationLocation = false; + public int crimsonIsleReputationShowLocation = 1; @Expose @ConfigOption(name = "Tia Relay", desc = "") 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 156062432..cb5006aa7 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 @@ -151,4 +151,10 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) { val z = locationData[2].asDouble - 1 return LorenzVec(x, y, z) } + + fun showLocations() = when (config.crimsonIsleReputationShowLocation) { + 0 -> true + 1 -> OSUtils.isKeyHeld(config.reputationHelperHotkey) + else -> false + } }
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt index 597de55e4..bab45b0a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt @@ -27,7 +27,7 @@ class DailyKuudraBossHelper(private val reputationHelper: CrimsonIsleReputationH if (!LorenzUtils.inSkyBlock) return if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return - if (!SkyHanniMod.feature.misc.crimsonIsleReputationLocation) return + if (!reputationHelper.showLocations()) return if (allKuudraDone) return kuudraLocation?.let { 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 827ed137a..14e5b131a 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 @@ -179,7 +179,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { @SubscribeEvent fun onRenderWorld(event: RenderWorldLastEvent) { if (!isEnabled()) return - if (!SkyHanniMod.feature.misc.crimsonIsleReputationLocation) return + if (!reputationHelper.showLocations()) return for (quest in quests) { if (quest is MiniBossQuest) continue 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 ad9032d43..982551549 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 @@ -42,7 +42,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel if (!LorenzUtils.inSkyBlock) return if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return if (!SkyHanniMod.feature.misc.crimsonIsleReputationHelper) return - if (!SkyHanniMod.feature.misc.crimsonIsleReputationLocation) return + if (!reputationHelper.showLocations()) return val playerLocation = LocationUtils.playerLocation() for (miniBoss in miniBosses) { |