mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 08:56:49 +01:00
e1770df81e
Replace /datum/gas_mixture/proc/return_pressure with XGM_PRESSURE(xgm) macro. Having such a relatively simple statement contributing proc overhead to procs called millions of times is ridiculous Rename /datum/gas_mixture/proc/zburn to react, deleting the old react which was just an alias for it. Free proc overhead Turn check_combustibility into a macro CHECK_COMBUSTIBLE(is_cmb, xgm). also rewrite it slightly so that it only needs to do one pass. Its a bit nasty so I apologize for that, but speeeeed. Delete most powernet and obj/machinery/power procs for handling power, replacing them with macros. The fact that we were unironically calling a draw_power() on APCs to call draw_power() on their terminals to call draw_power() on their powernet every single process tick was insane. Turn `between` into a macro alias for clamp() since the param order is different turn `Percent` into a macro AS_PCT Rewrite significant chunks of update_canmove so its not quite as horrifying of a proc and hopefully doesn't eat the entire mob subsystem every movement now
86 lines
2.0 KiB
Plaintext
86 lines
2.0 KiB
Plaintext
/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
|
|
to_chat(mob, "No zone here.")
|
|
var/datum/gas_mixture/mix = T.return_air()
|
|
to_chat(mob, "[XGM_PRESSURE(mix)] kPa [mix.temperature]C")
|
|
for(var/g in mix.gas)
|
|
to_chat(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))
|
|
to_chat(mob, "The turf can pass air! :D")
|
|
else
|
|
to_chat(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)
|
|
to_chat(mob, "Neither turf can connect. :(")
|
|
|
|
else
|
|
to_chat(mob, "The initial turf only can connect. :\\")
|
|
else
|
|
if(t_block & AIR_BLOCKED)
|
|
to_chat(mob, "The other turf can connect, but not the initial turf. :/")
|
|
|
|
else
|
|
to_chat(mob, "Both turfs can connect! :)")
|
|
|
|
to_chat(mob, "Additionally, \...")
|
|
|
|
if(o_block & ZONE_BLOCKED)
|
|
if(t_block & ZONE_BLOCKED)
|
|
to_chat(mob, "neither turf can merge.")
|
|
else
|
|
to_chat(mob, "the other turf cannot merge.")
|
|
else
|
|
if(t_block & ZONE_BLOCKED)
|
|
to_chat(mob, "the initial turf cannot merge.")
|
|
else
|
|
to_chat(mob, "both turfs can merge.")
|
|
|
|
/client/proc/ZASSettings()
|
|
set category = "Debug"
|
|
|
|
GLOB.vsc.SetDefault(mob)
|