aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-05-11 10:31:52 +0200
committerGitHub <noreply@github.com>2024-05-11 10:31:52 +0200
commit0d65354a797581221bbe5da31da706cebcc6e723 (patch)
tree02c32c6021784280ba0dcb291e9a735567474522 /src/main/java/at/hannibal2/skyhanni
parente9ffe61290d3a24d8b18685ec78fd743439a239f (diff)
downloadskyhanni-0d65354a797581221bbe5da31da706cebcc6e723.tar.gz
skyhanni-0d65354a797581221bbe5da31da706cebcc6e723.tar.bz2
skyhanni-0d65354a797581221bbe5da31da706cebcc6e723.zip
Improvement: Pest line middle of plot (#1647)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt14
1 files changed, 14 insertions, 0 deletions
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<ParticleLocation>) {