From ed7f4407b5eedceb127546f8ee145b4ce48741f0 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 12 Jun 2024 07:45:24 -0700 Subject: Improvement: Add config to hide duplication egg locations (#1991) --- .../skyhanni/features/event/hoppity/HoppityEggLocator.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/event') 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, ) { + private fun LorenzRenderWorldEvent.drawDuplicateEggs(islandEggsLocations: Set) { if (!config.highlightDuplicateEggLocations || !config.showNearbyDuplicateEggLocations) return for (eggLocation in islandEggsLocations) { val dist = eggLocation.distanceToPlayer() -- cgit