Update _lists.dm

This commit is contained in:
LetterJay
2017-07-19 13:39:49 -05:00
committed by GitHub
parent f61e22958f
commit 0b27e4c11b
+10 -5
View File
@@ -88,16 +88,21 @@
L -= V //No return here so that it removes all strings of that type
return
//returns a new list with only atoms that are in typecache L
/proc/typecache_filter_list(list/atoms, list/typecache, reversed=FALSE)
/proc/typecache_filter_list(list/atoms, list/typecache)
. = list()
for (var/thing in atoms)
var/atom/A = thing
if (typecache[A.type] && !reversed)
. += A
else if(reversed)
if (typecache[A.type])
. += A
/proc/typecache_filter_list_reverse(list/atoms, list/typecache)
. = list()
for (var/thing in atoms)
var/atom/A = thing
if (!typecache[A.type])
. += A
//Like typesof() or subtypesof(), but returns a typecache instead of a list
/proc/typecacheof(path, ignore_root_path, only_root_path = FALSE)
if(ispath(path))