aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-11 11:42:11 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-11 11:42:11 +0100
commit5477d22a05c366095f402de10c1e0b9b15e18320 (patch)
tree1ce68edfe72dbd54ec5f630119c7b79013edb98e /src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
parent20cbb7d8e48757ae21230a650dcee06a56aaa190 (diff)
downloadskyhanni-5477d22a05c366095f402de10c1e0b9b15e18320.tar.gz
skyhanni-5477d22a05c366095f402de10c1e0b9b15e18320.tar.bz2
skyhanni-5477d22a05c366095f402de10c1e0b9b15e18320.zip
Added /shdebugwaypoint as test/debug command.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
index 36042b977..1f8e0a626 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
@@ -8,10 +8,12 @@ import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.SlayerAPI
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames
+import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull
@@ -19,15 +21,18 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld
import at.hannibal2.skyhanni.utils.LocationUtils
+import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzDebug
import at.hannibal2.skyhanni.utils.LorenzLogger
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.makeAccessible
+import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.OSUtils
+import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
import at.hannibal2.skyhanni.utils.SoundUtils
@@ -68,6 +73,31 @@ class SkyHanniDebugsAndTests {
LorenzDebug.log(text)
}
+ private var testLocation: LorenzVec? = null
+
+ @SubscribeEvent
+ fun onRenderWorld(event: LorenzRenderWorldEvent) {
+ testLocation?.let {
+ event.drawWaypointFilled(it, LorenzColor.WHITE.toColor())
+ event.drawDynamicText(it, "Test", 1.5)
+ }
+ }
+
+ fun waypoint(args: Array<String>) {
+ SoundUtils.playBeepSound()
+
+ if (args.isEmpty()) {
+ testLocation = null
+ LorenzUtils.chat("reset test waypoint")
+ }
+
+ val x = args[0].toDouble()
+ val y = args[1].toDouble()
+ val z = args[2].toDouble()
+ testLocation = LorenzVec(x, y, z)
+ LorenzUtils.chat("set test waypoint")
+ }
+
fun testCommand(args: Array<String>) {
SoundUtils.playBeepSound()