Adds QDEL_LIST helpers (#26101)

* QDEL_LIST

* QDEL_LIST_ASSOC

* Wew
This commit is contained in:
Cyberboss
2017-04-12 19:20:42 -04:00
committed by oranges
parent cd847d77d8
commit d9944b6dec
+3
View File
@@ -1279,6 +1279,9 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
#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_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#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) qel(L[I]); L.Cut(); }
/proc/random_nukecode()
var/val = rand(0, 99999)