aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/events
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-18 18:47:22 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-18 18:47:22 +0100
commit4c83ab3595adf8af8588c2bca3b4f7e472b62af0 (patch)
tree858995493b1fecb169c4c84330fa3d44f112b6be /src/main/java/at/hannibal2/skyhanni/events
parent3d3f1f8cc911d02cfdc89074a8b49866f1db5085 (diff)
downloadskyhanni-4c83ab3595adf8af8588c2bca3b4f7e472b62af0.tar.gz
skyhanni-4c83ab3595adf8af8588c2bca3b4f7e472b62af0.tar.bz2
skyhanni-4c83ab3595adf8af8588c2bca3b4f7e472b62af0.zip
Add DebugDataCollectEvent and add Diana Burrow Nearest Warp to /shdebugdata
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt
new file mode 100644
index 000000000..1cb72c4f8
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt
@@ -0,0 +1,26 @@
+package at.hannibal2.skyhanni.events
+
+class DebugDataCollectEvent(private val builder: StringBuilder) : LorenzEvent() {
+
+ private var currentTitle = ""
+
+ fun title(title: String) {
+ if (currentTitle != "") error("Title already set")
+
+ currentTitle = title
+ }
+
+ fun exit(text: String) {
+ addData(listOf(text))
+ }
+
+ fun addData(text: List<String>) {
+ if (currentTitle == "") error("Title not set")
+
+ builder.append("\n$currentTitle\n")
+ for (line in text) {
+ builder.append(" $line\n")
+ }
+ currentTitle = ""
+ }
+}