Merge pull request #3719 from Citadel-Station-13/upstream-merge-31769

[MIRROR] Fixes admin buildmode stripping people naked yet again, adds GetAllContentsIgnoring
This commit is contained in:
LetterJay
2017-11-01 01:40:54 -04:00
committed by GitHub
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -518,6 +518,19 @@ Turf and target are separate in case you want to teleport some distance from a t
assembled += A
return assembled
/atom/proc/GetAllContentsIgnoring(list/ignore_typecache)
if(!ignore_typecache)
return GetAllContents()
var/list/processing = list(src)
var/list/assembled = list()
while(processing.len)
var/atom/A = processing[1]
processing.Cut(1,2)
if(!ignore_typecache[A.type])
processing += A.contents
assembled += A
return assembled
//Step-towards method of determining whether one atom can see another. Similar to viewers()
/proc/can_see(atom/source, atom/target, length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
var/turf/current = get_turf(source)
+1 -1
View File
@@ -440,7 +440,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(), ignored_atoms | ignore_typecache)
var/list/allowed_contents = typecache_filter_list_reverse(GetAllContentsIgnoring(ignore_typecache), ignored_atoms)
allowed_contents -= src
for(var/i in 1 to allowed_contents.len)
var/thing = allowed_contents[i]