Files
Aurora.3/code/modules/effects/effect_system.dm
Lohikar 73c29bd5a7 Miscellaneous Fixes (#1868)
changes:

Engineering now actually gets engineering-type alert consoles instead of the non-functional base type.
Lighting is no longer broken by shuttles.
The ERT shuttle autoannouncer should no longer cause lighting runtimes.
Fixed some bad newlines in some character setup help texts.
Custom loadout tweaks now properly write to SQL.
Custom loadout is now saved as JSON.
Players are now shown a notice when the server was unable to load their custom loadout.
Drowsyness is now clamped to zero.
Added some new tips to the example.
Tweaked some tips' grammar.
Removed some tips that do not apply to our code base.
Probably fixes embraced vampire thralls not getting vampire verbs.
Fixes #1844.
Fixes #1835.
Probably fixes #1687.
Probably fixes #1824.
Fixes #1839
2017-03-05 15:14:28 +02:00

38 lines
940 B
Plaintext

// -- Effect System --
// The base type for the new processor-driven effect system.
/datum/effect_system
var/atom/movable/holder // The object this effect is attached to. If this is set, the effect will not be qdel()'d at end of processing.
var/turf/location // Where the effect is
/datum/effect_system/New(var/queue = TRUE)
. = ..()
if (queue)
src.queue()
/datum/effect_system/Destroy()
if (holder)
holder = null
..()
// Queues an effect.
/datum/effect_system/proc/queue()
if (effect_master)
effect_master.queue(src)
return TRUE
return FALSE
/datum/effect_system/proc/process()
if (holder)
location = get_turf(holder)
return EFFECT_HALT
return EFFECT_DESTROY // Terminate effect if it's not attached to something.
/datum/effect_system/proc/bind(var/target)
holder = target
/datum/effect_system/proc/set_loc(var/atom/movable/loc)
if (istype(loc, /turf/))
location = loc
else
location = get_turf(loc)