summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-18 19:18:53 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-18 19:18:53 +0100
commitfc19b7274edc318de60bc9628f1e87d36f285c63 (patch)
tree55aab6e27879aa9163dfb855749b7bef5ff2631b /src/main/java/at/hannibal2/skyhanni/data
parent829aea323a35e88384e2e258049b5c74c7fafb7e (diff)
downloadskyhanni-fc19b7274edc318de60bc9628f1e87d36f285c63.tar.gz
skyhanni-fc19b7274edc318de60bc9628f1e87d36f285c63.tar.bz2
skyhanni-fc19b7274edc318de60bc9628f1e87d36f285c63.zip
moving dungeons and slayer related debug data into DebugDataCollectEvent. allowing to hide or search for specific debug data with /shdebug <search>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
index 2a6b99297..2829bcb8d 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.events.DebugDataCollectEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.SlayerChangeEvent
@@ -62,7 +63,7 @@ object SlayerAPI {
return result
}
- fun getNameWithEnchantmentFor(internalName: NEUInternalName): String {
+ private fun getNameWithEnchantmentFor(internalName: NEUInternalName): String {
if (internalName.asString() == "WISP_POTION") {
return "§fWisp's Ice-Flavored Water"
}
@@ -70,6 +71,25 @@ object SlayerAPI {
}
@SubscribeEvent
+ fun onDebugDataCollect(event: DebugDataCollectEvent) {
+ event.title("Slayer")
+
+ if (!hasActiveSlayerQuest()) {
+ event.exit("no active slayer quest")
+ return
+ }
+
+ event.addData(
+ buildList {
+ add("activeSlayer: ${getActiveSlayer()}")
+ add("isInCorrectArea: $isInCorrectArea")
+ add("isInAnyArea: $isInAnyArea")
+ add("latestSlayerProgress: $latestSlayerProgress")
+ }
+ )
+ }
+
+ @SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!LorenzUtils.inSkyBlock) return