This commit is contained in:
Vi3trice
2022-11-02 10:22:04 -04:00
committed by GitHub
parent d00d53803f
commit 599221a602
2 changed files with 11 additions and 2 deletions
@@ -41,10 +41,16 @@
user.hud_used.lingstingdisplay.invisibility = 101
/datum/action/changeling/sting/can_sting(mob/user, mob/target)
if(!..() || !iscarbon(target) || !isturf(user.loc) || !length(get_path_to(user, target, max_distance = cling.sting_range, simulated_only = FALSE)))
if(!..() || !iscarbon(target) || !isturf(user.loc))
return FALSE
if(get_dist(user, target) > cling.sting_range) // Too far, don't bother pathfinding
to_chat(user, "<span class='warning'>Our target is too far for our sting!</span>")
return FALSE
if(!length(get_path_to(user, target, max_distance = cling.sting_range, simulated_only = FALSE, skip_first = FALSE)))
to_chat(user, "<span class='warning'>Our sting is blocked from reaching our target!</span>")
return FALSE
if(!cling.chosen_sting)
to_chat(user, "We haven't prepared our sting yet!")
to_chat(user, "<span class='warning'>We haven't prepared our sting yet!</span>")
return FALSE
if(ismachineperson(target))
to_chat(user, "<span class='warning'>This won't work on synthetics.</span>")
+3
View File
@@ -201,6 +201,9 @@
AM.setDir(current_dir)
now_pushing = FALSE
/mob/living/CanPathfindPass(obj/item/card/id/ID, to_dir, atom/movable/caller, no_id = FALSE)
return TRUE // Unless you're a mule, something's trying to run you over.
/mob/living/proc/can_track(mob/living/user)
//basic fast checks go first. When overriding this proc, I recommend calling ..() at the end.
var/turf/T = get_turf(src)