mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-01 20:42:08 +00:00
* every case of initialize that should have mapload, does * E Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
71 lines
1.8 KiB
Plaintext
71 lines
1.8 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.
|
|
/////////////////////////////////////////////
|
|
|
|
/proc/do_sparks(n, c, source)
|
|
// n - number of sparks
|
|
// c - cardinals, bool, do the sparks only move in cardinal directions?
|
|
// source - source of the sparks.
|
|
|
|
var/datum/effect_system/spark_spread/sparks = new
|
|
sparks.set_up(n, c, source)
|
|
sparks.autocleanup = TRUE
|
|
sparks.start()
|
|
|
|
|
|
/obj/effect/particle_effect/sparks
|
|
name = "sparks"
|
|
icon_state = "sparks"
|
|
anchored = TRUE
|
|
light_system = MOVABLE_LIGHT
|
|
light_range = 2
|
|
light_power = 0.5
|
|
light_color = LIGHT_COLOR_FIRE
|
|
|
|
/obj/effect/particle_effect/sparks/Initialize(mapload)
|
|
..()
|
|
return INITIALIZE_HINT_LATELOAD
|
|
|
|
/obj/effect/particle_effect/sparks/LateInitialize()
|
|
flick(icon_state, src)
|
|
playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
|
var/turf/T = loc
|
|
if(isturf(T))
|
|
T.hotspot_expose(1000,100)
|
|
QDEL_IN(src, 20)
|
|
|
|
/obj/effect/particle_effect/sparks/Destroy()
|
|
var/turf/T = loc
|
|
if(isturf(T))
|
|
T.hotspot_expose(1000,100)
|
|
return ..()
|
|
|
|
/obj/effect/particle_effect/sparks/Move()
|
|
..()
|
|
var/turf/T = loc
|
|
if(isturf(T))
|
|
T.hotspot_expose(1000,100)
|
|
|
|
/datum/effect_system/spark_spread
|
|
effect_type = /obj/effect/particle_effect/sparks
|
|
|
|
/datum/effect_system/spark_spread/quantum
|
|
effect_type = /obj/effect/particle_effect/sparks/quantum
|
|
|
|
|
|
//electricity
|
|
|
|
/obj/effect/particle_effect/sparks/electricity
|
|
name = "lightning"
|
|
icon_state = "electricity"
|
|
|
|
/obj/effect/particle_effect/sparks/quantum
|
|
name = "quantum sparks"
|
|
icon_state = "quantum_sparks"
|
|
|
|
/datum/effect_system/lightning_spread
|
|
effect_type = /obj/effect/particle_effect/sparks/electricity
|