From 54162947bcc4d061dd8832d8ebf8193bb838fccc Mon Sep 17 00:00:00 2001 From: Putnam Date: Mon, 9 Dec 2019 07:10:01 -0800 Subject: [PATCH] Also takes into account external temp (radiation coming back in, specifically) --- code/modules/atmospherics/machinery/datum_pipeline.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index b66026262c..19f3f58708 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -155,9 +155,10 @@ var/target_temperature var/target_heat_capacity // first calculate heat from radiation. there's an implied "* 1 tick" here. - // Minimizing temp to 4 billion is mostly to prevent -infinity temperatures. // 0.05 magic multiplicand is, first, 0.1 deciseconds; second, half of the radiation's going right back into the gas. - var/heat = (STEFANBOLTZMANN*(share_volume**(2/3))*(min(air.temperature,4000000000)**4))*0.05 + var/share_constant = STEFANBOLTZMANN*(share_volume**(2/3))*0.05 + // Minimizing temp to 4 billion is mostly to prevent -infinity temperatures. + var/heat = share_constant*(min(air.temperature,4000000000)**4) if(isopenturf(target)) @@ -169,7 +170,7 @@ if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0)) var/delta_temperature = air.temperature - target_temperature - + heat -= share_constant*(min(target_temperature,4000000000)**4) heat += thermal_conductivity*delta_temperature* \ (partial_heat_capacity*target_heat_capacity/(partial_heat_capacity+target_heat_capacity)) @@ -187,6 +188,7 @@ var/sharer_temperature_delta = 0 if((sharer_heat_capacity>0) && (partial_heat_capacity>0)) + heat -= share_constant*(min(target_temperature,4000000000)**4) heat += thermal_conductivity*delta_temperature* \ (partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity)) @@ -203,6 +205,7 @@ if((target.heat_capacity>0) && (partial_heat_capacity>0)) var/delta_temperature = air.temperature - target.temperature + heat -= share_constant*(min(target.temperature,4000000000)**4) heat += thermal_conductivity*delta_temperature* \ (partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))