diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index bc6c893a5c5..87749afbaf9 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -10,16 +10,29 @@ //mob verbs are faster than object verbs. See above. /mob/living/pointed(atom/A as mob|obj|turf in view()) + if(!isturf(src.loc) || !(A in range(world.view, get_turf(src)))) + return FALSE if(src.stat || !src.canmove || src.restrained()) - return 0 + return FALSE if(src.status_flags & FAKEDEATH) - return 0 - if(!..()) - return 0 + return FALSE - src.visible_message("[src] points to [A].") - return 1 + face_atom(A) + if(isturf(A)) + if(pointing_effect) + clear_point() + pointing_effect = new /obj/effect/decal/point(A) + pointing_effect.invisibility = invisibility + addtimer(CALLBACK(src, .proc/clear_point), 20) + else + var/pointglow = filter(type = "drop_shadow", x = 0, y = -1, offset = 2, size = 1, color = "#F00") + LAZYADD(A.filters, pointglow) + addtimer(CALLBACK(src, .proc/remove_filter, A, pointglow), 20) + visible_message("\The [src] points to \the [A].") + return TRUE +/mob/living/proc/remove_filter(var/atom/A, var/filter_to_remove) + LAZYREMOVE(A.filters, filter_to_remove) /*one proc, four uses swapping: if it's 1, the mobs are trying to switch, if 0, non-passive is pushing passive diff --git a/html/changelogs/geeves-pointing_filter.yml b/html/changelogs/geeves-pointing_filter.yml new file mode 100644 index 00000000000..0af24561493 --- /dev/null +++ b/html/changelogs/geeves-pointing_filter.yml @@ -0,0 +1,6 @@ +author: Geeves, MoondancerPony + +delete-after: True + +changes: + - rscadd: "Pointing at something now highlights it instead of making an arrow. Pointing at turfs unaffected." \ No newline at end of file