///////////////////////////////////////////// //SPARK SYSTEM (like steam system) // The attach(atom/atom) proc is optional, and can be called to attach the effect // to something, like the RCD, so then you can just call start() and the sparks // will always spawn at the items location. ///////////////////////////////////////////// /obj/effect/vfx/sparks name = "sparks" icon_state = "sparks" var/amount = 6.0 anchored = 1.0 mouse_opacity = 0 /obj/effect/vfx/sparks/Initialize() . = ..() playsound(src, "sparks", 100, 1) var/turf/T = src.loc if (istype(T, /turf)) T.hotspot_expose(1000,100) QDEL_IN(src, 5 SECONDS) /obj/effect/vfx/sparks/Destroy() var/turf/T = src.loc if (istype(T, /turf)) T.hotspot_expose(1000,100) return ..() /obj/effect/vfx/sparks/Moved(atom/old_loc, direction, forced = FALSE) . = ..() if(isturf(loc)) var/turf/T = loc T.hotspot_expose(1000,100) /datum/effect_system/spark_spread var/total_sparks = 0 // To stop it being spammed and lagging! /datum/effect_system/spark_spread/set_up(n = 3, c = 0, loca) if(n > 10) n = 10 number = n cardinals = c if(istype(loca, /turf/)) location = loca else location = get_turf(loca) /datum/effect_system/spark_spread/start() var/i = 0 for(i=0, i 20) return spawn(0) if(holder) src.location = get_turf(holder) var/obj/effect/vfx/sparks/sparks = new /obj/effect/vfx/sparks(src.location) src.total_sparks++ var/direction if(src.cardinals) direction = pick(cardinal) else direction = pick(alldirs) for(i=0, i