diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm index 69dd54e810..70793d7a1d 100644 --- a/code/__HELPERS/_lists.dm +++ b/code/__HELPERS/_lists.dm @@ -173,23 +173,20 @@ /proc/typecache_filter_list(list/atoms, list/typecache) RETURN_TYPE(/list) . = list() - for(var/thing in atoms) - var/atom/A = thing + for(var/atom/A as anything in atoms) if (typecache[A.type]) . += A /proc/typecache_filter_list_reverse(list/atoms, list/typecache) RETURN_TYPE(/list) . = list() - for(var/thing in atoms) - var/atom/A = thing + for(var/atom/A as anything in atoms) if(!typecache[A.type]) . += A /proc/typecache_filter_multi_list_exclusion(list/atoms, list/typecache_include, list/typecache_exclude) . = list() - for(var/thing in atoms) - var/atom/A = thing + for(var/atom/A as anything in atoms) if(typecache_include[A.type] && !typecache_exclude[A.type]) . += A