From c11d7693888f0932715a5c9a5f68e4b19b31f75c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 9 Nov 2021 20:17:34 -0700 Subject: [PATCH] Update _lists.dm --- code/__HELPERS/_lists.dm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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