aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorMax <max.bodifee@gmail.com>2024-06-12 07:45:24 -0700
committerGitHub <noreply@github.com>2024-06-12 16:45:24 +0200
commited7f4407b5eedceb127546f8ee145b4ce48741f0 (patch)
treebebacb333a876ea08a0fc7a0363524cb265404a7 /src/main/java/at/hannibal2/skyhanni
parent191709f74379465286aa47142b8962849c67aa7f (diff)
downloadskyhanni-ed7f4407b5eedceb127546f8ee145b4ce48741f0.tar.gz
skyhanni-ed7f4407b5eedceb127546f8ee145b4ce48741f0.tar.bz2
skyhanni-ed7f4407b5eedceb127546f8ee145b4ce48741f0.zip
Improvement: Add config to hide duplication egg locations (#1991)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt9
2 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java
index 6ec9f2439..816471e16 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java
@@ -39,6 +39,13 @@ public class HoppityEggsConfig {
public boolean showAllWaypoints = false;
@Expose
+ @ConfigOption(name = "Hide Duplicate Waypoints", desc = "Hides egg waypoints you have found. §e" +
+ "Only works when you don't have an Egglocator in your inventory.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean hideDuplicateWaypoints = false;
+
+ @Expose
@ConfigOption(name = "Mark Duplicate Locations", desc = "Marks egg location waypoints which you have already found in red.")
@ConfigEditorBoolean
@FeatureToggle
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt
index 46a72c421..c3a628a67 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt
@@ -93,9 +93,14 @@ object HoppityEggLocator {
}
}
- val islandEggsLocations = HoppityEggLocations.islandLocations ?: return
+ var islandEggsLocations = HoppityEggLocations.islandLocations ?: return
if (shouldShowAllEggs()) {
+ if (config.hideDuplicateWaypoints) {
+ islandEggsLocations = islandEggsLocations.filter {
+ !HoppityEggLocations.hasCollectedEgg(it)
+ }.toSet()
+ }
for (eggLocation in islandEggsLocations) {
event.drawEggWaypoint(eggLocation, "§aEgg")
}
@@ -115,7 +120,7 @@ object HoppityEggLocator {
}
}
- private fun LorenzRenderWorldEvent.drawDuplicateEggs(islandEggsLocations: Set<LorenzVec>, ) {
+ private fun LorenzRenderWorldEvent.drawDuplicateEggs(islandEggsLocations: Set<LorenzVec>) {
if (!config.highlightDuplicateEggLocations || !config.showNearbyDuplicateEggLocations) return
for (eggLocation in islandEggsLocations) {
val dist = eggLocation.distanceToPlayer()