Files
Aurora.3/code/ZAS/Diagnostic.dm
Lohikar 0d08d096f0 Fix MultiZAS (#2614)
changes:

MultiZAS now actually works.
The ZAS connection diagnostic verb is now aware of MultiZ.
Potential performance improvement for ZAS connections.
Probably should not be merged until shuttles have roofs unless people want to take their chances at outrunning ZAS getting off the shuttle.
2017-06-10 22:38:41 +03:00

98 lines
2.1 KiB
Plaintext

/*client/proc/ZoneTick()
set category = "Debug"
set name = "Process Atmos"
var/result = SSair.tick(true)
if(result)
src << "Sucessfully Processed."
else
src << "Failed to process! ([SSair.tick_progress])"*/
client/proc/Zone_Info(turf/T as null|turf)
set category = "Debug"
if(T)
if(istype(T,/turf/simulated) && T:zone)
T:zone:dbg_data(src)
else
mob << "No zone here."
var/datum/gas_mixture/mix = T.return_air()
mob << "[mix.return_pressure()] kPa [mix.temperature]C"
for(var/g in mix.gas)
mob << "[g]: [mix.gas[g]]\n"
else
if(zone_debug_images)
for(var/zone in zone_debug_images)
images -= zone_debug_images[zone]
zone_debug_images = null
client/var/list/zone_debug_images
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
set category = "Debug"
if(!istype(T))
return
var/direction_list = list(
"North" = NORTH,
"South" = SOUTH,
"East" = EAST,
"West" = WEST,
"Up" = UP,
"Down" = DOWN,
"N/A" = null
)
var/direction = input("What direction do you wish to test?","Set direction") as null|anything in direction_list
if(!direction)
return
if(direction == "N/A")
var/res
ATMOS_CANPASS_TURF(res, T, T)
if(!(res & AIR_BLOCKED))
mob << "The turf can pass air! :D"
else
mob << "No air passage :x"
return
var/turf/simulated/other_turf = get_step(T, direction_list[direction])
if(!istype(other_turf))
return
var/t_block
ATMOS_CANPASS_TURF(t_block, T, other_turf)
var/o_block
ATMOS_CANPASS_TURF(o_block, other_turf, T)
if(o_block & AIR_BLOCKED)
if(t_block & AIR_BLOCKED)
mob << "Neither turf can connect. :("
else
mob << "The initial turf only can connect. :\\"
else
if(t_block & AIR_BLOCKED)
mob << "The other turf can connect, but not the initial turf. :/"
else
mob << "Both turfs can connect! :)"
mob << "Additionally, \..."
if(o_block & ZONE_BLOCKED)
if(t_block & ZONE_BLOCKED)
mob << "neither turf can merge."
else
mob << "the other turf cannot merge."
else
if(t_block & ZONE_BLOCKED)
mob << "the initial turf cannot merge."
else
mob << "both turfs can merge."
client/proc/ZASSettings()
set category = "Debug"
vsc.SetDefault(mob)