mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-25 16:45:42 +00:00
* Remove hideous inline tab indentation, and bans it in contributing guidelines * a Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
//! Defines that give qdel hints.
|
|
//!
|
|
//! These can be given as a return in [/atom/proc/Destroy] or by calling [/proc/qdel].
|
|
|
|
/// `qdel` should queue the object for deletion.
|
|
#define QDEL_HINT_QUEUE 0
|
|
/// `qdel` should let the object live after calling [/atom/proc/Destroy].
|
|
#define QDEL_HINT_LETMELIVE 1
|
|
/// Functionally the same as the above. `qdel` should assume the object will gc on its own, and not check it.
|
|
#define QDEL_HINT_IWILLGC 2
|
|
/// Qdel should assume this object won't GC, and queue a hard delete using a hard reference.
|
|
#define QDEL_HINT_HARDDEL 3
|
|
// Qdel should assume this object won't gc, and hard delete it posthaste.
|
|
#define QDEL_HINT_HARDDEL_NOW 4
|
|
|
|
//! Defines for the [gc_destroyed][/datum/var/gc_destroyed] var.
|
|
|
|
#ifdef REFERENCE_TRACKING
|
|
/** If REFERENCE_TRACKING is enabled, qdel will call this object's find_references() verb.
|
|
*
|
|
* Functionally identical to [QDEL_HINT_QUEUE] if [GC_FAILURE_HARD_LOOKUP] is not enabled in _compiler_options.dm.
|
|
*/
|
|
#define QDEL_HINT_FINDREFERENCE 5
|
|
/// Behavior as [QDEL_HINT_FINDREFERENCE], but only if the GC fails and a hard delete is forced.
|
|
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6
|
|
#endif
|
|
|
|
#define GC_QUEUE_CHECK 1
|
|
#define GC_QUEUE_HARDDELETE 2
|
|
#define GC_QUEUE_COUNT 2 //increase this when adding more steps.
|
|
|
|
#define GC_QUEUED_FOR_QUEUING -1
|
|
#define GC_CURRENTLY_BEING_QDELETED -2
|
|
|
|
#define QDELING(X) (X.gc_destroyed)
|
|
#define QDELETED(X) (!X || QDELING(X))
|
|
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
|
|
|