mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 16:09:15 +00:00
10 lines
518 B
Plaintext
10 lines
518 B
Plaintext
/// Deletes the atom with a little fading out animation after a specified time
|
|
/atom/proc/fade_into_nothing(life_time = 5 SECONDS, fade_time = 3 SECONDS)
|
|
QDEL_IN(src, life_time)
|
|
if (life_time > fade_time && fade_time > 0)
|
|
addtimer(CALLBACK(src, PROC_REF(fade_into_nothing_animate), fade_time), life_time - fade_time, TIMER_DELETE_ME)
|
|
|
|
/// Actually does the fade out, used by fade_into_nothing()
|
|
/atom/proc/fade_into_nothing_animate(fade_time)
|
|
animate(src, alpha = 0, time = fade_time, flags = ANIMATION_PARALLEL)
|