mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-16 18:36:43 +01:00
Unify datum definitions (#3991)
Unifies all datum vars into a single file & moves all datum procs that made sense into that same file.
This commit is contained in:
@@ -211,6 +211,7 @@
|
||||
#include "code\datums\category.dm"
|
||||
#include "code\datums\computerfiles.dm"
|
||||
#include "code\datums\datacore.dm"
|
||||
#include "code\datums\datum.dm"
|
||||
#include "code\datums\discord_bot.dm"
|
||||
#include "code\datums\disease.dm"
|
||||
#include "code\datums\feedback.dm"
|
||||
|
||||
@@ -231,27 +231,6 @@ var/datum/controller/subsystem/garbage_collector/SSgarbage
|
||||
else if(D.gcDestroyed == GC_CURRENTLY_BEING_QDELETED)
|
||||
CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic")
|
||||
|
||||
// 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)
|
||||
weakref = null
|
||||
destroyed_event.raise_event(src)
|
||||
SSnanoui.close_uis(src)
|
||||
tag = null
|
||||
var/list/timers = active_timers
|
||||
active_timers = null
|
||||
if (timers)
|
||||
for (var/thing in timers)
|
||||
var/datum/timedevent/timer = thing
|
||||
if (timer.spent)
|
||||
continue
|
||||
qdel(timer)
|
||||
|
||||
return QDEL_HINT_QUEUE
|
||||
|
||||
/datum/var/gcDestroyed //Time when this object was destroyed.
|
||||
|
||||
/client/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
@@ -36,7 +36,3 @@ var/datum/controller/subsystem/processing/SSprocessing
|
||||
// Helper so PROCESS_KILL works.
|
||||
/datum/controller/subsystem/processing/proc/stop_processing(datum/D)
|
||||
STOP_PROCESSING(src, D)
|
||||
|
||||
/datum/var/isprocessing = 0
|
||||
/datum/proc/process()
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -220,7 +220,6 @@ var/datum/controller/subsystem/timer/SStimer
|
||||
timer_id_dict |= SStimer.timer_id_dict
|
||||
bucket_list |= SStimer.bucket_list
|
||||
|
||||
/datum/var/list/active_timers
|
||||
/datum/timedevent
|
||||
var/id
|
||||
var/datum/callback/callBack
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/datum
|
||||
var/tmp/list/active_timers
|
||||
var/tmp/datum/weakref/weakref
|
||||
var/tmp/isprocessing = 0
|
||||
var/tmp/gcDestroyed //Time when this object was destroyed.
|
||||
|
||||
// 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)
|
||||
weakref = null
|
||||
destroyed_event.raise_event(src)
|
||||
SSnanoui.close_uis(src)
|
||||
tag = null
|
||||
var/list/timers = active_timers
|
||||
active_timers = null
|
||||
if (timers)
|
||||
for (var/thing in timers)
|
||||
var/datum/timedevent/timer = thing
|
||||
if (timer.spent)
|
||||
continue
|
||||
qdel(timer)
|
||||
|
||||
return QDEL_HINT_QUEUE
|
||||
|
||||
/datum/proc/process()
|
||||
return PROCESS_KILL
|
||||
@@ -1,10 +1,6 @@
|
||||
/datum
|
||||
var/datum/weakref/weakref
|
||||
|
||||
/datum/weakref
|
||||
var/ref
|
||||
|
||||
|
||||
/datum/weakref/New(datum/D)
|
||||
ref = SOFTREF(D)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user