Merge pull request #2977 from Citadel-Station-13/upstream-merge-31027

[MIRROR] GetAllContents performance increase
This commit is contained in:
LetterJay
2017-09-29 01:41:58 -04:00
committed by GitHub
2 changed files with 7 additions and 23 deletions
+1 -1
View File
@@ -444,7 +444,7 @@
/turf/proc/empty(turf_type=/turf/open/space, baseturf_type, list/ignore_typecache, forceop = FALSE)
// 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_reverse(GetAllContents(ignore_typecache), ignored_atoms)
var/list/allowed_contents = typecache_filter_list_reverse(GetAllContents(), ignored_atoms | ignore_typecache)
allowed_contents -= src
for(var/i in 1 to allowed_contents.len)
var/thing = allowed_contents[i]