[MIRROR] Some ZAS tweaks and minor optimizations (#9544)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2024-12-01 18:31:06 +01:00
committed by GitHub
co-authored by Heroman3003 Kashargul
parent 0473c33bcc
commit a7e4ef7dad
47 changed files with 332 additions and 469 deletions
+10 -10
View File
@@ -2,7 +2,7 @@
Overview:
These are what handle gas transfers between zones and into space.
They are found in a zone's edges list and in air_master.edges.
They are found in a zone's edges list and in SSair.edges.
Each edge updates every air tick due to their role in gas transfer.
They come in two flavors, /connection_edge/zone and /connection_edge/unsimulated.
As the type names might suggest, they handle inter-zone and spacelike connections respectively.
@@ -82,7 +82,7 @@ Class Procs:
/connection_edge/proc/contains_zone(zone/Z)
/connection_edge/proc/erase()
air_master.remove_edge(src)
SSair.remove_edge(src)
//to_world("[type] Erased.")
/connection_edge/proc/tick()
@@ -169,19 +169,19 @@ Class Procs:
if(equiv)
if(direct)
erase()
air_master.merge(A, B)
SSair.merge(A, B)
return
else
A.air.equalize(B.air)
air_master.mark_edge_sleeping(src)
SSair.mark_edge_sleeping(src)
air_master.mark_zone_update(A)
air_master.mark_zone_update(B)
SSair.mark_zone_update(A)
SSair.mark_zone_update(B)
/connection_edge/zone/recheck()
// Edges with only one side being vacuum need processing no matter how close.
if(!A.air.compare(B.air, vacuum_exception = 1))
air_master.mark_edge_active(src)
SSair.mark_edge_active(src)
//Helper proc to get connections for a zone.
/connection_edge/zone/proc/get_connected_zone(zone/from)
@@ -233,16 +233,16 @@ Class Procs:
if(equiv)
A.air.copy_from(air)
air_master.mark_edge_sleeping(src)
SSair.mark_edge_sleeping(src)
air_master.mark_zone_update(A)
SSair.mark_zone_update(A)
/connection_edge/unsimulated/recheck()
// Edges with only one side being vacuum need processing no matter how close.
// Note: This handles the glaring flaw of a room holding pressure while exposed to space, but
// does not specially handle the less common case of a simulated room exposed to an unsimulated pressurized turf.
if(!A.air.compare(air, vacuum_exception = 1))
air_master.mark_edge_active(src)
SSair.mark_edge_active(src)
/proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//This implements a simplistic version of the Stefan-Boltzmann law.