Files
Aurora.3/code/modules/effects/sparks/visuals.dm
Lohikar 5e33bd0e2c Misc tweaks (#3916)
changes:

/obj/visual_effect has been repathed to /obj/effect/visual.
Openspace movables will no longer use the space plane when on an openturf mimicing a space turf.
Lights now only update on direction change if your direction actually changed.
Fixed some bad set_dir() procs that were either pointless or that didn't return parent.
Mapped-in or maint dirtier-spawned glowing goo no longer self-deletes after 2 minutes.
Fixed an issue that may have caused some openspace movables to not properly handle direction changes.
2017-12-09 00:36:53 +02:00

28 lines
609 B
Plaintext

// -- Spark visual effect --
/obj/effect/visual/sparks
name = "sparks"
icon_state = "sparks"
anchored = 1
mouse_opacity = 0
/obj/effect/visual/sparks/Initialize(mapload)
. = ..(mapload)
life_ticks = rand(5,10)
/obj/effect/visual/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/effect/visual/sparks/start(var/direction)
if (direction)
addtimer(CALLBACK(src, .proc/do_step, direction), 5)
/obj/effect/visual/sparks/proc/do_step(direction)
step(src, direction)