Files
Bubberstation/code/__HELPERS/qdel.dm
SkyratBot 40ebaf7e46 [MIRROR] Revert "Fixes Destroy() runtiming when mob had a disease" (#5081)
* Revert "Fixes Destroy() runtiming when mob had a disease (#52810)" (#58564)

This reverts commit 199a99e839.

This did not fix anything, it merely obscures a blantant bug by supressing the runtime from trying to call methods on an already nulled list.

* Revert "Fixes Destroy() runtiming when mob had a disease"

Co-authored-by: oranges <email@oranges.net.nz>
2021-04-22 02:12:13 +01:00

11 lines
752 B
Plaintext

#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_NULL(item) qdel(item); item = null
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }
/proc/______qdel_list_wrapper(list/L) //the underscores are to encourage people not to use this directly.
QDEL_LIST(L)