Skip to content

Commit

Permalink
Improvement: Add Distance to Patcher Send Coords Waypoints (#2704)
Browse files Browse the repository at this point in the history
Co-authored-by: Cal <cwolfson58@gmail.com>
  • Loading branch information
jani270 and CalMWolfs authored Oct 11, 2024
1 parent f448c90 commit ec5c195
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())
}
}

Expand Down

0 comments on commit ec5c195

Please sign in to comment.