diff options
author | Luna <luna@alexia.lol> | 2024-06-08 19:41:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-08 19:41:21 +0200 |
commit | 5bb98aed61e4dadba12d203aad770d0408171ef3 (patch) | |
tree | acacb4490a48b43703d9d8fd429408971fdb2fab /src/main | |
parent | a2f29b2bfe846c9d0cd2a45b2b8352bab556da37 (diff) | |
download | skyhanni-5bb98aed61e4dadba12d203aad770d0408171ef3.tar.gz skyhanni-5bb98aed61e4dadba12d203aad770d0408171ef3.tar.bz2 skyhanni-5bb98aed61e4dadba12d203aad770d0408171ef3.zip |
Improvement: Auto-detect whether Great Explorer is maxed (#2032)
Diffstat (limited to 'src/main')
3 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java index 79238b29f..2f277d925 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java @@ -46,11 +46,6 @@ public class PowderTrackerConfig { public boolean onlyWhenPowderGrinding = false; @Expose - @ConfigOption(name = "Great Explorer", desc = "Enable this if your Great Explorer perk is maxed.") - @ConfigEditorBoolean - public boolean greatExplorerMaxed = false; - - @Expose @ConfigOption( name = "Text Format", desc = "Drag text to change the appearance of the overlay." diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index 51b86cf92..c1ae1390a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -247,6 +247,9 @@ enum class HotmData( storage?.perks?.computeIfAbsent(this.name) { HotmTree.HotmPerk() }?.level = value } + val isMaxLevel: Boolean + get() = activeLevel >= maxLevel // >= to account for +1 from Blue Cheese + private fun blueEgg() = if (this != PEAK_OF_THE_MOUNTAIN && maxLevel != 1 && HotmAPI.isBlueEggActive) 1 else 0 var enabled: Boolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index 180989fc4..a936f9636 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry import at.hannibal2.skyhanni.data.BossbarData +import at.hannibal2.skyhanni.data.HotmData import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent @@ -131,7 +132,7 @@ object PowderTracker { if (!isEnabled()) return val msg = event.message - if (config.greatExplorerMaxed) { + if (HotmData.GREAT_EXPLORER.let { it.enabled && it.isMaxLevel }) { uncoveredPattern.matchMatcher(msg) { tracker.modify { it.totalChestPicked += 1 |