aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
index 3c3c0d90b..4f3b3713c 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
@@ -62,7 +62,7 @@ object SlayerAPI {
}
event.addData {
- add("activeSlayer: ${getActiveSlayer()}")
+ add("activeSlayer: $activeSlayer")
add("isInCorrectArea: $isInCorrectArea")
add("isInAnyArea: $isInAnyArea")
add("latestSlayerProgress: $latestSlayerProgress")
@@ -82,9 +82,7 @@ object SlayerAPI {
}
}
- fun getActiveSlayer() = activeSlayer.getValue()
-
- private val activeSlayer = RecalculatingValue(1.seconds) {
+ val activeSlayer by RecalculatingValue(1.seconds) {
grabActiveSlayer()
}
@@ -125,7 +123,7 @@ object SlayerAPI {
} else {
val slayerTypeForCurrentArea = getSlayerTypeForCurrentArea()
isInAnyArea = slayerTypeForCurrentArea != null
- slayerTypeForCurrentArea == getActiveSlayer() && slayerTypeForCurrentArea != null
+ slayerTypeForCurrentArea == activeSlayer && slayerTypeForCurrentArea != null
}
}
}