From ec5c1957e6f24a2ca25d5242fa169540ac461344 Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:47:13 +0200 Subject: [PATCH] Improvement: Add Distance to Patcher Send Coords Waypoints (#2704) Co-authored-by: Cal --- .../skyhanni/features/misc/PatcherSendCoordinates.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt index 98232a428d3c..3babbc52a4af 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt @@ -9,9 +9,11 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.LocationUtils +import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.drawColor import at.hannibal2.skyhanni.utils.RenderUtils.drawString @@ -67,9 +69,12 @@ object PatcherSendCoordinates { for (beacon in patcherBeacon) { val location = beacon.location + val distance = location.distanceToPlayer() + val formattedDistance = distance.toInt().addSeparators() + event.drawColor(location, LorenzColor.DARK_GREEN, alpha = 1f) event.drawWaypointFilled(location, config.color.toChromaColor(), true, true) - event.drawString(location.add(0.5, 0.5, 0.5), beacon.name, true, LorenzColor.DARK_BLUE.toColor()) + event.drawString(location.add(0.5, 0.5, 0.5), beacon.name + " §e[${formattedDistance}m]", true, LorenzColor.DARK_BLUE.toColor()) } }