Port /tg/ vis_contents openspace

This commit is contained in:
Chompstation Bot
2021-06-30 19:49:25 +00:00
parent 2457a62edd
commit bf04ca9003
44 changed files with 4966 additions and 540 deletions

View File

@@ -286,9 +286,24 @@ var/mobs_radio_range_fired = 1 //CHOMPEdit
var/list/hear = dview(range,T,INVISIBILITY_MAXIMUM)
var/list/hearturfs = list()
// Openspace visibility handling
// Below turfs we can see
for(var/turf/simulated/open/O in hear)
var/turf/U = GetBelow(O)
while(istype(U))
hearturfs |= U
U = GetBelow(U)
// Above us
var/above_range = range
var/turf/Ab = GetAbove(T)
while(isopenspace(Ab) && --above_range > 0)
hear |= dview(above_range,Ab,INVISIBILITY_MAXIMUM)
Ab = GetAbove(Ab)
for(var/thing in hear)
if(istype(thing, /obj)) //Can't use isobj() because /atom/movable returns true in that, and so lighting overlays would be included
if(istype(thing, /obj)) //Can't use isobj() because /atom/movable returns true in that
objs += thing
hearturfs |= get_turf(thing)
if(ismob(thing))

View File

@@ -156,10 +156,6 @@
if(z_level_change) // Same goes for mobs.
M.onTransitZ(T.z, X.z)
if(istype(M, /mob/living))
var/mob/living/LM = M
LM.check_shadow() // Need to check their Z-shadow, which is normally done in forceMove().
if(shuttlework)
var/turf/simulated/shuttle/SS = T
SS.landed_holder.leave_turf(turftoleave)

View File

@@ -851,10 +851,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
if(z_level_change) // Same goes for mobs.
M.onTransitZ(T.z, X.z)
if(istype(M, /mob/living))
var/mob/living/LM = M
LM.check_shadow() // Need to check their Z-shadow, which is normally done in forceMove().
if(shuttlework)
var/turf/simulated/shuttle/SS = T
SS.landed_holder.leave_turf()