From 12c00abefbc7b558b163b730bf56d0b9ff27de06 Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 17 Apr 2024 16:00:25 +0200 Subject: Improvement: Match Kat order in Vermin Tracker (#1459) --- .../skyhanni/features/rift/area/westvillage/VerminTracker.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt index cf6d0e3e1..0d349e9fb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt @@ -66,10 +66,10 @@ object VerminTracker { var count: MutableMap = mutableMapOf() } - enum class VerminType(val vermin: String, val pattern: Pattern) { - SILVERFISH("§aSilverfish", silverfishPattern), - SPIDER("§aSpiders", spiderPattern), - FLY("§aFlies", flyPattern), + enum class VerminType(val order: Int, val vermin: String, val pattern: Pattern) { + FLY(1, "§aFlies", flyPattern), + SPIDER(2, "§aSpiders", spiderPattern), + SILVERFISH(3, "§aSilverfish", silverfishPattern), } @SubscribeEvent @@ -152,7 +152,7 @@ object VerminTracker { private fun drawDisplay(data: Data): List> = buildList { addAsSingletonList("§7Vermin Tracker:") - data.count.entries.sortedByDescending { it.value }.forEach { (vermin, amount) -> + data.count.entries.sortedBy { it.key.order }.forEach { (vermin, amount) -> val verminName = vermin.vermin addAsSingletonList(" §7- §e${amount.addSeparators()} $verminName") } -- cgit