mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user