I accidentally ALL THE THINGS! But yeah, ZAS is updated.

This commit is contained in:
Aryn
2012-05-26 02:01:26 -06:00
parent 084e2ae561
commit 6f00258376
44 changed files with 2120 additions and 794 deletions
+10 -25
View File
@@ -128,28 +128,19 @@ datum/pipeline
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
if(istype(target) && target.parent && target.parent.group_processing)
if(istype(target) && target.zone)
//Have to consider preservation of group statuses
var/datum/gas_mixture/turf_copy = new
turf_copy.copy_from(target.parent.air)
turf_copy.volume = target.parent.air.volume //Copy a good representation of the turf from parent group
turf_copy.copy_from(target.zone.air)
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
equalize_gases(list(air_sample, turf_copy))
air.merge(air_sample)
if(target.parent.air.compare(turf_copy))
//The new turf would be an acceptable group member so permit the integration
turf_copy.subtract(target.zone.air)
turf_copy.subtract(target.parent.air)
target.parent.air.merge(turf_copy)
else
//Comparison failure so dissemble group and copy turf
target.parent.suspend_group_processing()
target.air.copy_from(turf_copy)
target.zone.air.merge(turf_copy)
else
var/datum/gas_mixture/turf_air = target.return_air()
@@ -187,9 +178,9 @@ datum/pipeline
var/delta_temperature = 0
var/sharer_heat_capacity = 0
if(modeled_location.parent && modeled_location.parent.group_processing)
delta_temperature = (air.temperature - modeled_location.parent.air.temperature)
sharer_heat_capacity = modeled_location.parent.air.heat_capacity()
if(modeled_location.zone)
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
else
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
@@ -208,14 +199,8 @@ datum/pipeline
air.temperature += self_temperature_delta
if(modeled_location.parent && modeled_location.parent.group_processing)
if((abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && (abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*modeled_location.parent.air.temperature))
modeled_location.parent.suspend_group_processing()
modeled_location.air.temperature += sharer_temperature_delta
else
modeled_location.parent.air.temperature += sharer_temperature_delta/modeled_location.parent.air.group_multiplier
if(modeled_location.zone)
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
else
modeled_location.air.temperature += sharer_temperature_delta