aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()