aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt119
1 files changed, 69 insertions, 50 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
index a89a3bb05..ded048300 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
@@ -32,29 +32,64 @@ object DebugCommand {
val event = DebugDataCollectEvent(list, search)
- event.title("Player")
- event.ignore {
- add("name: '${LorenzUtils.getPlayerName()}'")
- add("uuid: '${LorenzUtils.getPlayerUuid()}'")
+ // calling default debug stuff
+ player(event)
+ repoAutoUpdate(event)
+ globalRender(event)
+ skyblockStatus(event)
+ profileName(event)
+ profileType(event)
+
+ event.postAndCatch()
+
+ if (event.empty) {
+ list.add("")
+ list.add("Nothing interesting to show right now!")
+ list.add("Looking for something specific? /shdebug <search>")
+ list.add("Wanna see everything? /shdebug all")
}
- event.title("Repo Auto Update")
- if (SkyHanniMod.feature.dev.repoAutoUpdate) {
- event.ignore("normal enabled")
+ list.add("```")
+ OSUtils.copyToClipboard(list.joinToString("\n"))
+ LorenzUtils.chat("§eCopied SkyHanni debug data in the clipboard.")
+ }
+
+ private fun profileType(event: DebugDataCollectEvent) {
+ event.title("Profile Type")
+ if (!LorenzUtils.inSkyBlock) {
+ event.ignore("Not on SkyBlcok")
} else {
- event.addData("The repo does not auto update because auto update is disabled!")
+ val classic = !LorenzUtils.noTradeMode
+ if (classic) {
+ event.ignore("on classic")
+ } else {
+ if (HypixelData.ironman) {
+ event.addData("on ironman")
+ }
+ if (HypixelData.stranded) {
+ event.addData("on stranded")
+ }
+ if (HypixelData.bingo) {
+ event.addData("on bingo")
+ }
+ }
}
+ }
- event.title("Global Render")
- if (SkyHanniDebugsAndTests.globalRender) {
- event.ignore("normal enabled")
+ private fun profileName(event: DebugDataCollectEvent) {
+ event.title("Profile Name")
+ if (!LorenzUtils.inSkyBlock) {
+ event.ignore("Not on SkyBlcok")
} else {
- event.addData {
- add("Global renderer is disabled!")
- add("No renderable elements from SkyHanni will show up anywhere!")
+ if (HypixelData.profileName != "") {
+ event.ignore("profileName: '${HypixelData.profileName}'")
+ } else {
+ event.addData("profile name is empty!")
}
}
+ }
+ private fun skyblockStatus(event: DebugDataCollectEvent) {
event.title("SkyBlock Status")
if (!LorenzUtils.onHypixel) {
event.addData("not on Hypixel")
@@ -73,50 +108,34 @@ object DebugCommand {
}
}
}
+ }
- event.title("Profile Name")
- if (!LorenzUtils.inSkyBlock) {
- event.ignore("Not on SkyBlcok")
+ private fun globalRender(event: DebugDataCollectEvent) {
+ event.title("Global Render")
+ if (SkyHanniDebugsAndTests.globalRender) {
+ event.ignore("normal enabled")
} else {
- if (HypixelData.profileName != "") {
- event.ignore("profileName: '${HypixelData.profileName}'")
- } else {
- event.addData("profile name is empty!")
+ event.addData {
+ add("Global renderer is disabled!")
+ add("No renderable elements from SkyHanni will show up anywhere!")
}
}
+ }
-
- event.title("Profile Type")
- if (!LorenzUtils.inSkyBlock) {
- event.ignore("Not on SkyBlcok")
+ private fun repoAutoUpdate(event: DebugDataCollectEvent) {
+ event.title("Repo Auto Update")
+ if (SkyHanniMod.feature.dev.repoAutoUpdate) {
+ event.ignore("normal enabled")
} else {
- val classic = !LorenzUtils.noTradeMode
- if (classic) {
- event.ignore("on classic")
- } else {
- if (HypixelData.ironman) {
- event.addData("on ironman")
- }
- if (HypixelData.stranded) {
- event.addData("on stranded")
- }
- if (HypixelData.bingo) {
- event.addData("on bingo")
- }
- }
+ event.addData("The repo does not auto update because auto update is disabled!")
}
+ }
- event.postAndCatch()
-
- if (event.empty) {
- list.add("")
- list.add("Nothing interesting to show right now!")
- list.add("Looking for something specific? /shdebug <search>")
- list.add("Wanna see everything? /shdebug all")
+ private fun player(event: DebugDataCollectEvent) {
+ event.title("Player")
+ event.ignore {
+ add("name: '${LorenzUtils.getPlayerName()}'")
+ add("uuid: '${LorenzUtils.getPlayerUuid()}'")
}
-
- list.add("```")
- OSUtils.copyToClipboard(list.joinToString("\n"))
- LorenzUtils.chat("§eCopied SkyHanni debug data in the clipboard.")
}
}