Merge pull request #16515 from ShadowLarkens/zas

Some ZAS tweaks and minor optimizations
This commit is contained in:
Heroman3003
2024-11-28 05:34:47 +10:00
committed by GitHub
45 changed files with 330 additions and 460 deletions
+2 -2
View File
@@ -13,8 +13,8 @@
// Special case to prevent us from being part of a zone during the first air master tick.
// We must merge ourselves into a zone on next tick. This will cause a bit of lag on
// startup, but it can't really be helped you know?
if(air_master && air_master.current_cycle == 0)
if(SSair && SSair.current_cycle == 0)
spawn(1)
air_master.mark_for_update(get_turf(src))
SSair.mark_for_update(get_turf(src))
return FALSE
return is_zone ? FALSE : TRUE // Anything except zones can pass
+2 -2
View File
@@ -251,9 +251,9 @@
if (!isturf(NT) || (NT in found) || (NT in pending))
continue
// We ask ZAS to determine if its airtight. Thats what matters anyway right?
if(air_master.air_blocked(T, NT))
if(SSair.air_blocked(T, NT))
// Okay thats the edge of the room
if(get_area_type(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT))
if(get_area_type(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT))
found += NT // So we include walls/doors not already in any area
continue
if (istype(NT, /turf/space))
+4 -4
View File
@@ -678,9 +678,9 @@
if(!visual && forbiddenAreas[NT.loc.type])
return ROOM_ERR_FORBIDDEN
// We ask ZAS to determine if its airtight. Thats what matters anyway right?
if(air_master.air_blocked(T, NT))
if(SSair.air_blocked(T, NT))
// Okay thats the edge of the room
if(get_area_type(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT))
if(get_area_type(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT))
found += NT // So we include walls/doors not already in any area
continue
if (istype(NT, /turf/space))
@@ -835,9 +835,9 @@
if(!get_new_area_type(NT.loc) == 1) //The contains somewhere that is NOT a buildable area.
return 3 //NOT A BUILDABLE AREA
if(air_master.air_blocked(T, NT)) //Is the room airtight?
if(SSair.air_blocked(T, NT)) //Is the room airtight?
// Okay thats the edge of the room
if(get_new_area_type(NT.loc) == 1 && air_master.air_blocked(NT, NT))
if(get_new_area_type(NT.loc) == 1 && SSair.air_blocked(NT, NT))
found += NT // So we include walls/doors not already in any area
continue
if (istype(NT, /turf/space))