mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes #11594
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user