From 5e01624dcc315a2bf7665fc808b1113fa4c9e0d8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 13 Sep 2024 20:23:57 +0200 Subject: Feature: Graphs Pathfinding (#2468) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index d3a5e0bce..9e95df881 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.core.config.Position import at.hannibal2.skyhanni.data.HypixelData +import at.hannibal2.skyhanni.data.IslandGraphs import at.hannibal2.skyhanni.events.GuiKeyPressEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -120,12 +121,17 @@ object SkyHanniDebugsAndTests { val x = args[0].toDouble() val y = args[1].toDouble() val z = args[2].toDouble() - testLocation = LorenzVec(x, y, z) + val location = LorenzVec(x, y, z) + testLocation = location + if (args.getOrNull(3) == "pathfind") { + IslandGraphs.pathFind(location) + } ChatUtils.chat("set test waypoint") } fun testCommand(args: Array) { - SoundUtils.playBeepSound() + + // val a = Thread { OSUtils.copyToClipboard("123") } // val b = Thread { OSUtils.copyToClipboard("456") } // a.start() @@ -509,8 +515,7 @@ object SkyHanniDebugsAndTests { fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { if (!LorenzUtils.inSkyBlock) return - @Suppress("ConstantConditionIf") - if (false) { + @Suppress("ConstantConditionIf") if (false) { itemRenderDebug() } @@ -545,8 +550,7 @@ object SkyHanniDebugsAndTests { @SubscribeEvent fun onGuiRenderChestGuiOverlayRender(event: GuiRenderEvent.ChestGuiOverlayRenderEvent) { - @Suppress("ConstantConditionIf") - if (false) { + @Suppress("ConstantConditionIf") if (false) { dragAbleTest() } } @@ -594,8 +598,7 @@ object SkyHanniDebugsAndTests { }.editCopy { this.add( 0, - generateSequence(scale) { it + 0.1 }.take(25).map { Renderable.string(it.round(1).toString()) } - .toList(), + generateSequence(scale) { it + 0.1 }.take(25).map { Renderable.string(it.round(1).toString()) }.toList(), ) } config.debugItemPos.renderRenderables( -- cgit