diff options
author | Maratons4 <81237150+Maratons4@users.noreply.github.com> | 2024-08-23 11:50:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-23 10:50:33 +0200 |
commit | 7d45133463f375252ba3e7e269cf1d27162aa1ee (patch) | |
tree | 11080ee6a7f98a08329de41d9ccf7e713b41d481 | |
parent | 7bcc247bd3f27735bbfff207ce72b3e2cffb512e (diff) | |
download | skyhanni-7d45133463f375252ba3e7e269cf1d27162aa1ee.tar.gz skyhanni-7d45133463f375252ba3e7e269cf1d27162aa1ee.tar.bz2 skyhanni-7d45133463f375252ba3e7e269cf1d27162aa1ee.zip |
Fix: typo in corpse detection (#2386)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt index f7fdcad4d..3ea9ee4b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt @@ -36,7 +36,7 @@ object CorpseLocator { */ private val mineshaftCoordsPattern by RepoPattern.pattern( "mineshaft.corpse.coords", - "x: (?<x>-?\\d+), y: (?<y>-?\\d+), z: (?<z>-?\\d+)(?:.+)?" + "x: (?<x>-?\\d+), y: (?<y>-?\\d+), z: (?<z>-?\\d+)(?:.+)?", ) private val sharedWaypoints: MutableList<LorenzVec> = mutableListOf() @@ -53,13 +53,15 @@ object CorpseLocator { val canSee = entity.getLorenzVec().canBeSeen(-1..3) if (canSee) { - ChatUtils.chat("Located a ${corpseType.displayText} and marked its location with a waypoint.") + val article = if (corpseType.displayText == "Umber Corpse") "an" else "a" + ChatUtils.chat("Located $article ${corpseType.displayText} and marked its location with a waypoint.") + MineshaftWaypoints.waypoints.add( MineshaftWaypoint( waypointType = corpseType, location = entity.getLorenzVec().add(y = 1), - isCorpse = true - ) + isCorpse = true, + ), ) } } @@ -70,7 +72,7 @@ object CorpseLocator { .filterNot { corpse -> sharedWaypoints.any { corpse.location.distance(it) <= 5 } } - .filter { it.location.distanceToPlayer() <= 5} + .filter { it.location.distanceToPlayer() <= 5 } .minByOrNull { it.location.distanceToPlayer() } ?: return val (x, y, z) = closestCorpse.location.toDoubleArray().map { it.toInt() } |