From 1f2b21342a1136ddcd57b9d3823b64cf1ee45efa Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 12 May 2024 12:17:04 +0200 Subject: code cleanup --- .../features/rift/everywhere/EnigmaSoulWaypoints.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt index 7b337a2e5..cd2f667eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt @@ -98,13 +98,14 @@ object EnigmaSoulWaypoints { val split = event.slot.stack.displayName.split("Enigma: ") if (split.size == 2) { event.makePickblock() - if (soulLocations.contains(split.last())) { - if (!trackedSouls.contains(split.last())) { - ChatUtils.chat("§5Tracking the ${split.last()} Enigma Soul!", prefixColor = "§5") - trackedSouls.add(split.last()) + val name = split.last() + if (soulLocations.contains(name)) { + if (!trackedSouls.contains(name)) { + ChatUtils.chat("§5Tracking the $name Enigma Soul!", prefixColor = "§5") + trackedSouls.add(name) } else { - trackedSouls.remove(split.last()) - ChatUtils.chat("§5No longer tracking the ${split.last()} Enigma Soul!", prefixColor = "§5") + trackedSouls.remove(name) + ChatUtils.chat("§5No longer tracking the $name Enigma Soul!", prefixColor = "§5") } } } -- cgit