Filter Helpers and Heat Exchanging Pipes (#12051)

This commit is contained in:
Geeves
2021-06-21 18:14:34 -03:00
committed by GitHub
parent 924f31fb76
commit 0d1a724f9e
5 changed files with 77 additions and 10 deletions
+3 -7
View File
@@ -10,7 +10,7 @@
//mob verbs are faster than object verbs. See above.
var/mob/living/next_point_time = 0
/mob/living/pointed(atom/A as mob|obj|turf in view())
/mob/living/pointed(atom/movable/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())
@@ -29,15 +29,11 @@ var/mob/living/next_point_time = 0
pointing_effect.invisibility = invisibility
addtimer(CALLBACK(GLOBAL_PROC, /proc/qdel, pointing_effect), 2 SECONDS)
else
var/pointglow = filter(type = "drop_shadow", x = 0, y = -1, offset = 1, size = 1, color = "#F00")
LAZYADD(A.filters, pointglow)
addtimer(CALLBACK(src, .proc/remove_filter, A, pointglow), 20)
A.add_filter("pointglow", 1, list(type = "drop_shadow", x = 0, y = -1, offset = 1, size = 1, color = "#F00"))
addtimer(CALLBACK(A, /atom/movable.proc/remove_filter, "pointglow"), 2 SECONDS)
visible_message("<b>\The [src]</b> 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
default behaviour is: