Files
kiwistation/code/game/objects/effects/effect_system/effects_sparks.dm
T
XDTM 86f184a802 Quantum teleportation makes rainbow sparks (#44664)
About The Pull Request

Happy pride month

Jokes aside, since its addition quantum teleportation has always had a rapidly-changing-rainbow motif, i thought that making the sparks behave in the same way would be cool now that we have teleport flags.
Side change: non-bluespace teleportation no longer makes sparks by default.
Changelog

cl
tweak: Quantum teleportation now makes pretty rainbow sparks instead of the normal ones.
fix: Non-bluespace teleportation (spells etc.) no longer makes sparks.
/cl
2019-06-24 10:50:33 +12:00

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_power = 1.3
light_range = MINIMUM_USEFUL_LIGHT_RANGE
light_color = LIGHT_COLOR_FIRE
/obj/effect/particle_effect/sparks/Initialize()
..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/particle_effect/sparks/LateInitialize()
flick(icon_state, src) // replay the animation
playsound(src, "sparks", 100, TRUE)
var/turf/T = loc
if(isturf(T))
T.hotspot_expose(1000,100)
sleep(20)
qdel(src)
/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