mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 16:12:19 +00:00
Spent lots of time and lots of changes to fix issues:
bugfix: "Mechs no longer runtime during destroy call."
bugfix: "Turrets and NPCS no longer target empty mechs."
bugfix: "Mechs no longer runtime during armor check. Mechs now use their armor and values for it. Before it would ignore them entirely and deal 100% damage."
Added ismech() define and also QDEL_NULL_LIST() define from TG. Matt's suggestion
renamed any armour references in mech code to armor to keep it consistent
24 lines
1.4 KiB
Plaintext
24 lines
1.4 KiB
Plaintext
//defines that give qdel hints. these can be given as a return in destory() or by calling
|
|
|
|
|
|
#define QDEL_HINT_QUEUE 0 //qdel should queue the object for deletion.
|
|
#define QDEL_HINT_LETMELIVE 1 //qdel should let the object live after calling destory.
|
|
#define QDEL_HINT_IWILLGC 2 //functionally the same as the above. qdel should assume the object will gc on its own, and not check it.
|
|
#define QDEL_HINT_HARDDEL 3 //qdel should assume this object won't gc, and queue a hard delete using a hard reference.
|
|
#define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste.
|
|
#define QDEL_HINT_FINDREFERENCE 5 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm.
|
|
//if TESTING is enabled, qdel will call this object's find_references() verb.
|
|
//defines for the gcDestroyed var
|
|
|
|
#define GC_QUEUED_FOR_QUEUING -1
|
|
#define GC_QUEUED_FOR_HARD_DEL -2
|
|
#define GC_CURRENTLY_BEING_QDELETED -3
|
|
|
|
#define QDELING(X) (X.gcDestroyed)
|
|
#define QDELETED(X) (!X || X.gcDestroyed)
|
|
#define QDESTROYING(X) (!X || X.gcDestroyed == GC_CURRENTLY_BEING_QDELETED)
|
|
|
|
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
|
|
#define QDEL_NULL(item) qdel(item); item = null
|
|
#define QDEL_NULL_LIST(x) if(x) { for(var/y in x) { qdel(y) }}; if(x) {x.Cut(); x = null } // Second x check to handle items that LAZYREMOVE on qdel.
|