From 0d65354a797581221bbe5da31da706cebcc6e723 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 11 May 2024 10:31:52 +0200 Subject: Improvement: Pest line middle of plot (#1647) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/garden/pests/PestParticleLine.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt index 272fa4ebc..581e6b2c6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt @@ -6,8 +6,11 @@ import at.hannibal2.skyhanni.events.ItemClickEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.features.garden.GardenAPI +import at.hannibal2.skyhanni.features.garden.GardenPlotAPI import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.DelayedRun +import at.hannibal2.skyhanni.utils.LocationUtils +import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils.isAnyOf import at.hannibal2.skyhanni.utils.LorenzVec @@ -85,6 +88,17 @@ class PestParticleLine { for (list in locations) { draw(event, list) } + showMiddle(event) + } + + private fun showMiddle(event: LorenzRenderWorldEvent) { + if (locations.size <= 0) return + val plot = GardenPlotAPI.getCurrentPlot() ?: return + val middle = plot.middle.copy(y = LocationUtils.playerLocation().y) + if (middle.distanceToPlayer() > 15) return + + event.drawWaypointFilled(middle, LorenzColor.GRAY.toColor()) + event.drawDynamicText(middle, "Middle", 1.0) } private fun draw(event: LorenzRenderWorldEvent, list: List) { -- cgit