mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-20 15:21:29 +00:00
* Initial Commit - Trying to add DC to Travis * Forgot to chmod * This took too long * Farie Fixes * Fixes new code * Job factions are fucking smelly * Loadouts work again * Runtime fixes
70 lines
1.8 KiB
Plaintext
70 lines
1.8 KiB
Plaintext
/datum
|
|
var/gc_destroyed //Time when this object was destroyed.
|
|
var/list/active_timers //for SStimer
|
|
var/list/datum_components //for /datum/components
|
|
/// Status traits attached to this datum
|
|
var/list/status_traits
|
|
var/list/comp_lookup
|
|
var/list/list/datum/callback/signal_procs
|
|
var/signal_enabled = FALSE
|
|
var/datum_flags = NONE
|
|
var/var_edited = FALSE //Warranty void if seal is broken
|
|
var/tmp/unique_datum_id = null
|
|
|
|
#ifdef TESTING
|
|
var/running_find_references
|
|
var/last_find_references = 0
|
|
#endif
|
|
|
|
// Default implementation of clean-up code.
|
|
// This should be overridden to remove all references pointing to the object being destroyed.
|
|
// Return the appropriate QDEL_HINT; in most cases this is QDEL_HINT_QUEUE.
|
|
/datum/proc/Destroy(force = FALSE, ...)
|
|
tag = null
|
|
|
|
var/list/timers = active_timers
|
|
active_timers = null
|
|
for(var/thing in timers)
|
|
var/datum/timedevent/timer = thing
|
|
if(timer.spent)
|
|
continue
|
|
qdel(timer)
|
|
|
|
//BEGIN: ECS SHIT
|
|
signal_enabled = FALSE
|
|
|
|
var/list/dc = datum_components
|
|
if(dc)
|
|
var/all_components = dc[/datum/component]
|
|
if(length(all_components))
|
|
for(var/I in all_components)
|
|
var/datum/component/C = I
|
|
qdel(C, FALSE, TRUE)
|
|
else
|
|
var/datum/component/C = all_components
|
|
qdel(C, FALSE, TRUE)
|
|
dc.Cut()
|
|
|
|
var/list/lookup = comp_lookup
|
|
if(lookup)
|
|
for(var/sig in lookup)
|
|
var/list/comps = lookup[sig]
|
|
if(length(comps))
|
|
for(var/i in comps)
|
|
var/datum/component/comp = i
|
|
comp.UnregisterSignal(src, sig)
|
|
else
|
|
var/datum/component/comp = comps
|
|
comp.UnregisterSignal(src, sig)
|
|
comp_lookup = lookup = null
|
|
|
|
for(var/target in signal_procs)
|
|
UnregisterSignal(target, signal_procs[target])
|
|
//END: ECS SHIT
|
|
|
|
return QDEL_HINT_QUEUE
|
|
|
|
|
|
/datum/nothing
|
|
// Placeholder object, used for ispath checks. Has to be defined to prevent errors, but shouldn't ever be created.
|