mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 16:12:19 +00:00
changes: Removed shim for old spark system. Converted all calls to old spark system with calls to new one. Processor-based effects are no longer pooled, as it had minimal performance impact and was breaking things. Tweaked some visible_messages for rogue drones. PB effects' handling of location is now done at the /datum/effect_system level.
32 lines
807 B
Plaintext
32 lines
807 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
|