aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/rift
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt
index aeb73b42d..d58eafd0e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt
@@ -109,7 +109,7 @@ class KloonHacking {
if (!config.waypoints) return
if (!wearingHelmet) return
val hidden = ProfileStorageData.profileSpecific?.rift ?: return
- for (terminal in KloonTerminal.values()) {
+ for (terminal in KloonTerminal.entries) {
if (terminal !in hidden.completedKloonTerminals) {
event.drawWaypointFilled(terminal.location, LorenzColor.DARK_RED.toColor(), true, true)
}
@@ -124,7 +124,7 @@ class KloonHacking {
"You've set the color of this terminal to (?<colour>.*)!".toPattern().matchMatcher(event.message.removeColor()) {
val hidden = ProfileStorageData.profileSpecific?.rift ?: return
val colour = group("colour")
- val completedTerminal = KloonTerminal.values().firstOrNull { it.name == colour } ?: return
+ val completedTerminal = KloonTerminal.entries.firstOrNull { it.name == colour } ?: return
if (completedTerminal != nearestTerminal) return
hidden.completedKloonTerminals.add(completedTerminal)
}
@@ -146,7 +146,7 @@ class KloonHacking {
var closestTerminal: KloonTerminal? = null
var closestDistance = 8.0
- for (terminal in KloonTerminal.values()) {
+ for (terminal in KloonTerminal.entries) {
val distance = terminal.location.distanceToPlayer()
if (distance < closestDistance) {
closestTerminal = terminal
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
index 1f88a4ad1..25bafb299 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
@@ -158,15 +158,17 @@ class ShowMotesNpcSellPrice {
}
val total = itemMap.values.fold(0.0) { acc, pair -> acc + pair.second }.formatPrice()
newDisplay.addAsSingletonList("§7Total price: §b$total")
- val name = FormatType.values()[config.inventoryValue.formatType].type
+ val name = FormatType.entries[config.inventoryValue.formatType].type
newDisplay.addAsSingletonList("§7Price format: §c$name")
- newDisplay.addSelector(" ", FormatType.values(),
+ newDisplay.addSelector<FormatType>(
+ " ",
getName = { type -> type.type },
isCurrent = { it.ordinal == config.inventoryValue.formatType },
onChange = {
config.inventoryValue.formatType = it.ordinal
update()
- })
+ }
+ )
return newDisplay
}