From 1f886448b65ef61ab90c98e8b4a77887da12843f Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Thu, 13 Jun 2013 18:20:42 -0700 Subject: [PATCH 1/2] Fixes a runtime involving ZAS zones lose their air datum. (I have no fucking idea why that happens) Fixes #3059 --- code/ZAS/Functions.dm | 47 ++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/code/ZAS/Functions.dm b/code/ZAS/Functions.dm index 7b4ea8dff86..ce24513418e 100644 --- a/code/ZAS/Functions.dm +++ b/code/ZAS/Functions.dm @@ -81,28 +81,43 @@ proc/ZMerge(zone/A,zone/B) if(!istype(A) || !istype(B)) return - //Merges two zones so that they are one. - var/a_size = A.air.group_multiplier - var/b_size = B.air.group_multiplier - var/c_size = a_size + b_size var/new_contents = A.contents + B.contents - //Set air multipliers to one so air represents gas per tile. - A.air.group_multiplier = 1 - B.air.group_multiplier = 1 - - //Remove some air proportional to the size of this zone. - A.air.remove_ratio(a_size/c_size) - B.air.remove_ratio(b_size/c_size) - - //Merge the gases and set the multiplier to the sum of the old ones. - A.air.merge(B.air) - A.air.group_multiplier = c_size - //Set all the zone vars. for(var/turf/simulated/T in B.contents) T.zone = A + if(istype(A.air) && istype(B.air)) + //Merges two zones so that they are one. + var/a_size = A.air.group_multiplier + var/b_size = B.air.group_multiplier + var/c_size = a_size + b_size + + //Set air multipliers to one so air represents gas per tile. + A.air.group_multiplier = 1 + B.air.group_multiplier = 1 + + //Remove some air proportional to the size of this zone. + A.air.remove_ratio(a_size/c_size) + B.air.remove_ratio(b_size/c_size) + + //Merge the gases and set the multiplier to the sum of the old ones. + A.air.merge(B.air) + A.air.group_multiplier = c_size + + //I hate when the air datum somehow disappears. + // Try to make it sorta work anyways. Fakit + else if(istype(B.air)) + A.air = B.air + A.air.group_multiplier = A.contents.len + + else if(istype(A.air)) + A.air.group_multiplier = A.contents.len + + //Doublefakit. + else + A.air = new + //Check for connections to merge into the new zone. for(var/connection/C in B.connections) //The Cleanup proc will delete the connection if the zones are the same. From a246caad632526e0a98b2e03e0c7115fc80e281f Mon Sep 17 00:00:00 2001 From: Chinsky Date: Fri, 14 Jun 2013 14:17:12 +0400 Subject: [PATCH 2/2] Fixes unticked file. No idea why some files get randomly unticked. --- baystation12.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/baystation12.dme b/baystation12.dme index 828007b0de8..b553a7a35bf 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -197,6 +197,7 @@ #include "code\game\communications.dm" #include "code\game\dna.dm" #include "code\game\hud.dm" +#include "code\game\response_team.dm" #include "code\game\shuttle_engines.dm" #include "code\game\skincmd.dm" #include "code\game\smoothwall.dm"