mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Port /tg/ vis_contents openspace
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user