Files
Aurora.3/code/modules/effects/sparks/visuals.dm
Lohikar 5b737098d9 do_after progress bars (#1857)
Adds the do_after progress bars that were originally going to be added with lighting, but got scrapped due to PR-bloat.

changes:

do_after actions now have a progress bar.
Added a changelog for directional lighting as I apparently forgot it.
The do_after proc's required arguments are unchanged, however it now accepts the argument act_target, which allows the caller to specify what object the progress bar should appear over. Defaults to user.
2017-03-05 22:03:59 +02:00

27 lines
513 B
Plaintext

// -- Spark visual_effect --
/obj/visual_effect/sparks
name = "sparks"
icon_state = "sparks"
anchored = 1
mouse_opacity = 0
/obj/visual_effect/sparks/New(var/turf/loc)
..(loc)
life_ticks = rand(5,10)
/obj/visual_effect/sparks/tick()
. = ..()
var/turf/T = get_turf(src)
if(T)
T.hotspot_expose(1000, 100)
if (life_ticks < 2)
animate(src, alpha = 0, time = 2, easing = SINE_EASING | EASE_IN)
/obj/visual_effect/sparks/start(var/direction)
..()
if (direction)
spawn (5)
step(src, direction)