[MIRROR] Startup Time Optimization (#10940)

Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-05-24 18:44:27 -07:00
committed by GitHub
parent 51d87471f7
commit 7f4da4eb22
13 changed files with 60 additions and 24 deletions

View File

@@ -56,6 +56,28 @@
#endif
return (AIR_BLOCKED*!CanZASPass(other, FALSE))|(ZONE_BLOCKED*!CanZASPass(other, TRUE))
/turf/proc/self_airblock()
if(blocks_air & AIR_BLOCKED)
return BLOCKED
if(blocks_air & ZONE_BLOCKED)
return ZONE_BLOCKED
var/result = 0
for(var/atom/movable/M as anything in contents)
switch(M.can_atmos_pass)
if(ATMOS_PASS_YES)
continue
if(ATMOS_PASS_NO)
return BLOCKED
if(ATMOS_PASS_DENSITY)
if(M.density)
return BLOCKED
if(ATMOS_PASS_PROC)
result |= M.c_airblock(src)
if(result == BLOCKED) return BLOCKED
return result
/turf/c_airblock(turf/other)
#ifdef ZASDBG
ASSERT(isturf(other))

View File

@@ -55,7 +55,7 @@
return
if(direction == "N/A")
if(!(T.c_airblock(T) & AIR_BLOCKED))
if(!(T.self_airblock() & AIR_BLOCKED))
to_chat(mob, "The turf can pass air! :D")
else
to_chat(mob, "No air passage :x")

View File

@@ -11,7 +11,7 @@
vis_contents -= graphic_remove
/turf/proc/update_air_properties()
var/block = c_airblock(src)
var/block = self_airblock()
if(block & AIR_BLOCKED)
//dbg(blocked)
return 1
@@ -139,8 +139,7 @@
c_copy_air()
zone = null //Easier than iterating through the list at the zone.
var/s_block // CHOMPEdit
ATMOS_CANPASS_TURF(s_block, src, src)
var/s_block = self_airblock()
if(s_block & AIR_BLOCKED)
#ifdef ZASDBG
if(verbose) to_world("Self-blocked.")