diff --git a/code/__HELPERS/_lists.dm.rej b/code/__HELPERS/_lists.dm.rej new file mode 100644 index 0000000000..cb63e7e160 --- /dev/null +++ b/code/__HELPERS/_lists.dm.rej @@ -0,0 +1,23 @@ +diff a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm (rejected hunks) +@@ -89,12 +89,18 @@ + return + + //returns a new list with only atoms that are in typecache L +-//if reversed, return a new list with only atoms that aren't 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) //This assumes typecache[A.type] is either null or TRUE. God help you if it's FALSE ++ 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 diff --git a/code/game/turfs/turf.dm.rej b/code/game/turfs/turf.dm.rej new file mode 100644 index 0000000000..f4c27f5c30 --- /dev/null +++ b/code/game/turfs/turf.dm.rej @@ -0,0 +1,10 @@ +diff a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm (rejected hunks) +@@ -410,7 +410,7 @@ + /turf/proc/empty(turf_type=/turf/open/space, baseturf_type) + // Remove all atoms except observers, landmarks, docking ports + var/static/list/ignored_atoms = typecacheof(list(/mob/dead, /obj/effect/landmark, /obj/docking_port, /atom/movable/lighting_object)) +- var/list/allowed_contents = typecache_filter_list(GetAllContents(),ignored_atoms,reversed=TRUE) ++ var/list/allowed_contents = typecache_filter_list_reverse(GetAllContents(),ignored_atoms) + allowed_contents -= src + for(var/i in 1 to allowed_contents.len) + var/thing = allowed_contents[i]