Port Bay-style attack animations (#4827)

* POLARIS: Attack animations

* POLARIS: Overlay flick system

You can't do this in Byond, unfortunately, so here's some code from /tg/

* Make attack anims a preference
This commit is contained in:
Aronai Sieyes
2018-02-15 22:02:04 -06:00
committed by Anewbe
parent 5a309f1aa1
commit 78d7ef1d72
7 changed files with 110 additions and 28 deletions

View File

@@ -339,6 +339,23 @@ proc
return 1
#undef SIGN
/proc/flick_overlay(image/I, list/show_to, duration, gc_after)
for(var/client/C in show_to)
C.images += I
spawn(duration)
if(gc_after)
qdel(I)
for(var/client/C in show_to)
C.images -= I
/proc/flick_overlay_view(image/I, atom/target, duration, gc_after) //wrapper for the above, flicks to everyone who can see the target atom
var/list/viewing = list()
for(var/m in viewers(target))
var/mob/M = m
if(M.client)
viewing += M.client
flick_overlay(I, viewing, duration, gc_after)
proc/isInSight(var/atom/A, var/atom/B)
var/turf/Aturf = get_turf(A)
var/turf/Bturf = get_turf(B)