diff --git a/code/ZAS/ConnectionGroup.dm b/code/ZAS/ConnectionGroup.dm index 11b1e22a0ba..2811ff6c77f 100644 --- a/code/ZAS/ConnectionGroup.dm +++ b/code/ZAS/ConnectionGroup.dm @@ -57,14 +57,12 @@ Class Procs: */ - -/connection_edge/var/zone/A - -/connection_edge/var/list/connecting_turfs = list() -/connection_edge/var/direct = 0 -/connection_edge/var/sleeping = 1 - -/connection_edge/var/coefficient = 0 +/connection_edge + var/zone/A + var/list/connecting_turfs = list() + var/direct = 0 + var/sleeping = 1 + var/coefficient = 0 /connection_edge/New() CRASH("Cannot make connection edge without specifications.") @@ -119,7 +117,8 @@ Class Procs: -/connection_edge/zone/var/zone/B +/connection_edge/zone + var/zone/B /connection_edge/zone/New(zone/A, zone/B) @@ -189,8 +188,11 @@ Class Procs: if(A == from) return B else return A -/connection_edge/unsimulated/var/turf/B -/connection_edge/unsimulated/var/datum/gas_mixture/air +/connection_edge/unsimulated + var/turf/B + +/connection_edge/unsimulated + var/datum/gas_mixture/air /connection_edge/unsimulated/New(zone/A, turf/B) src.A = A diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm index 5334586dd06..fa091ca5257 100644 --- a/code/controllers/subsystems/air.dm +++ b/code/controllers/subsystems/air.dm @@ -57,9 +57,44 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun if(active_edges.len) var/list/edge_log = list() for(var/connection_edge/E in active_edges) + + var/a_temp = E.A.air.temperature + var/a_moles = E.A.air.total_moles + var/a_vol = E.A.air.volume + var/a_gas = "" + for(var/gas in E.A.air.gas) + a_gas += "[gas]=[E.A.air.gas[gas]]" + + var/b_temp + var/b_moles + var/b_vol + var/b_gas = "" + + // Two zones mixing + if(istype(E, /connection_edge/zone)) + var/connection_edge/zone/Z = E + b_temp = Z.B.air.temperature + b_moles = Z.B.air.total_moles + b_vol = Z.B.air.volume + for(var/gas in Z.B.air.gas) + b_gas += "[gas]=[Z.B.air.gas[gas]]" + + // Zone and unsimulated turfs mixing + if(istype(E, /connection_edge/unsimulated)) + var/connection_edge/unsimulated/U = E + b_temp = U.B.temperature + b_moles = "Unsim" + b_vol = "Unsim" + for(var/gas in U.air.gas) + b_gas += "[gas]=[U.air.gas[gas]]" + edge_log += "Active Edge [E] ([E.type])" + edge_log += "Edge side A: T:[a_temp], Mol:[a_moles], Vol:[a_vol], Gas:[a_gas]" + edge_log += "Edge side B: T:[b_temp], Mol:[b_moles], Vol:[b_vol], Gas:[b_gas]" + for(var/turf/T in E.connecting_turfs) edge_log += "+--- Connecting Turf [T] ([T.type]) @ [T.x], [T.y], [T.z] ([T.loc])" + log_debug("Active Edges on ZAS Startup\n" + edge_log.Join("\n")) startup_active_edge_log = edge_log.Copy() diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index 8edf36fd4d9..6dfec2bd608 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -115,9 +115,42 @@ var/list/edge_log = list() if(active_edges) for(var/connection_edge/E in air_master.active_edges) + var/a_temp = E.A.air.temperature + var/a_moles = E.A.air.total_moles + var/a_vol = E.A.air.volume + var/a_gas = "" + for(var/gas in E.A.air.gas) + a_gas += "[gas]=[E.A.air.gas[gas]]" + + var/b_temp + var/b_moles + var/b_vol + var/b_gas = "" + + // Two zones mixing + if(istype(E, /connection_edge/zone)) + var/connection_edge/zone/Z = E + b_temp = Z.B.air.temperature + b_moles = Z.B.air.total_moles + b_vol = Z.B.air.volume + for(var/gas in Z.B.air.gas) + b_gas += "[gas]=[Z.B.air.gas[gas]]" + + // Zone and unsimulated turfs mixing + if(istype(E, /connection_edge/unsimulated)) + var/connection_edge/unsimulated/U = E + b_temp = U.B.temperature + b_moles = "Unsim" + b_vol = "Unsim" + for(var/gas in U.air.gas) + b_gas += "[gas]=[U.air.gas[gas]]" + edge_log += "Active Edge [E] ([E.type])" + edge_log += "Edge side A: T:[a_temp], Mol:[a_moles], Vol:[a_vol], Gas:[a_gas]" + edge_log += "Edge side B: T:[b_temp], Mol:[b_moles], Vol:[b_vol], Gas:[b_gas]" + for(var/turf/T in E.connecting_turfs) - edge_log += "+--- Connecting Turf [T] @ [T.x], [T.y], [T.z]" + edge_log += "+--- Connecting Turf [T] ([T.type]) @ [T.x], [T.y], [T.z] ([T.loc])" if(active_edges) fail("Maps contained [active_edges] active edges at round-start.\n" + edge_log.Join("\n"))