diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index f4f4e37990..44c7cd2590 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -28,9 +28,6 @@ datum/pipeline if(!member.check_pressure(pressure)) break //Only delete 1 pipe per process - //Allow for reactions - //air.react() //Should be handled by pipe_network now - proc/temporarily_store_air() //Update individual gas_mixtures by volume ratio diff --git a/code/ZAS/_gas_mixture_xgm.dm b/code/ZAS/_gas_mixture_xgm.dm index 594924eb47..406ddfa98d 100644 --- a/code/ZAS/_gas_mixture_xgm.dm +++ b/code/ZAS/_gas_mixture_xgm.dm @@ -308,7 +308,7 @@ return 1 -/datum/gas_mixture/proc/react(atom/dump_location) +/datum/gas_mixture/proc/react() zburn(null, force_burn=0, no_check=0) //could probably just call zburn() here with no args but I like being explicit. @@ -444,20 +444,25 @@ total_gas[g] += gasmix.gas[g] if(total_volume > 0) - //Average out the gases - for(var/g in total_gas) - total_gas[g] /= total_volume + var/datum/gas_mixture/combined = new(total_volume) + combined.gas = total_gas //Calculate temperature - var/temperature = 0 - if(total_heat_capacity > 0) - temperature = total_thermal_energy / total_heat_capacity + combined.temperature = total_thermal_energy / total_heat_capacity + combined.update_values() + + //Allow for reactions + combined.react() + + //Average out the gases + for(var/g in combined.gas) + combined.gas[g] /= total_volume //Update individual gas_mixtures for(var/datum/gas_mixture/gasmix in gases) - gasmix.gas = total_gas.Copy() - gasmix.temperature = temperature + gasmix.gas = combined.gas.Copy() + gasmix.temperature = combined.temperature gasmix.multiply(gasmix.volume) return 1