aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorMaratons4 <81237150+Maratons4@users.noreply.github.com>2024-08-23 11:50:33 +0300
committerGitHub <noreply@github.com>2024-08-23 10:50:33 +0200
commit7d45133463f375252ba3e7e269cf1d27162aa1ee (patch)
tree11080ee6a7f98a08329de41d9ccf7e713b41d481 /src/main/java/at/hannibal2
parent7bcc247bd3f27735bbfff207ce72b3e2cffb512e (diff)
downloadskyhanni-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>
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt12
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() }