diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm index 91eee45b4d..640966edc9 100644 --- a/code/__HELPERS/_lists.dm +++ b/code/__HELPERS/_lists.dm @@ -10,10 +10,16 @@ */ #define LAZYINITLIST(L) if (!L) L = list() -#define UNSETEMPTY(L) if (L && !L.len) L = null -#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } } +#define UNSETEMPTY(L) if (L && !length(L)) L = null +#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } } #define LAZYADD(L, I) if(!L) { L = list(); } L += I; +<<<<<<< HEAD #define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null) +======= +#define LAZYOR(L, I) if(!L) { L = list(); } L |= I; +#define LAZYFIND(L, V) L ? L.Find(V) : 0 +#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= length(L) ? L[I] : null) : L[I]) : null) +>>>>>>> 255f899... Fix 512-only code in recent conveyor belt fix (#36722) #define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V; #define LAZYLEN(L) length(L) #define LAZYCLEARLIST(L) if(L) L.Cut()