mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 00:51:23 +00:00
obj/effect/effect is now renamed obj/effect/particle_effect for better usability. datum/effect/system and /datum/effect/effect/system are now both /datum/effect_system. Fixes a bug where wall mounted igniters (and other spark producing objects) didn't produce sparks sometimes. Moved explosion_particles.dm into the effect_system folder, because it has effect_systems code.
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
/////////////////////////////////////////////
|
|
//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/particle_effect/sparks
|
|
name = "sparks"
|
|
icon_state = "sparks"
|
|
anchored = 1
|
|
|
|
/obj/effect/particle_effect/sparks/New()
|
|
..()
|
|
flick("sparks", src) // replay the animation
|
|
playsound(src.loc, "sparks", 100, 1)
|
|
var/turf/T = src.loc
|
|
if (istype(T, /turf))
|
|
T.hotspot_expose(1000,100)
|
|
spawn(20)
|
|
qdel(src)
|
|
|
|
/obj/effect/particle_effect/sparks/Destroy()
|
|
var/turf/T = src.loc
|
|
if (istype(T, /turf))
|
|
T.hotspot_expose(1000,100)
|
|
return ..()
|
|
|
|
/obj/effect/particle_effect/sparks/Move()
|
|
..()
|
|
var/turf/T = src.loc
|
|
if(isturf(T))
|
|
T.hotspot_expose(1000,100)
|
|
|
|
/datum/effect_system/spark_spread
|
|
effect_type = /obj/effect/particle_effect/sparks
|
|
|
|
|
|
//electricity
|
|
|
|
/obj/effect/particle_effect/sparks/electricity
|
|
name = "lightning"
|
|
icon_state = "electricity"
|
|
|
|
/datum/effect_system/lightning_spread
|
|
effect_type = /obj/effect/particle_effect/sparks/electricity |