aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorjani270 <69345714+jani270@users.noreply.github.com>2024-10-11 18:47:13 +0200
committerGitHub <noreply@github.com>2024-10-11 18:47:13 +0200
commitec5c1957e6f24a2ca25d5242fa169540ac461344 (patch)
tree89223b0f85f37cd2af1fde586a798963409a7c1a /src/main/java
parentf448c9095d914ef49bee400f53f291e537a5013d (diff)
downloadskyhanni-ec5c1957e6f24a2ca25d5242fa169540ac461344.tar.gz
skyhanni-ec5c1957e6f24a2ca25d5242fa169540ac461344.tar.bz2
skyhanni-ec5c1957e6f24a2ca25d5242fa169540ac461344.zip
Improvement: Add Distance to Patcher Send Coords Waypoints (#2704)
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt7
1 files changed, 6 insertions, 1 deletions
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 98232a428..3babbc52a 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())
}
}