Fixes freezers never quite reaching their thermostat temperature

This commit is contained in:
mwerezak
2014-08-23 10:52:57 -04:00
parent 025838532a
commit 3cd0cdf27f
2 changed files with 2 additions and 2 deletions

View File

@@ -119,7 +119,7 @@
cooling = 1 cooling = 1
update_use_power(2) update_use_power(2)
var/heat_transfer = min(abs(air_contents.get_thermal_energy_change(set_temperature)), active_power_usage) var/heat_transfer = min(abs(air_contents.get_thermal_energy_change(set_temperature - 5)), active_power_usage)
//Assume the heat is being pumped into the hull which is fixed at heatsink_temperature //Assume the heat is being pumped into the hull which is fixed at heatsink_temperature
//not /really/ proper thermodynamics but whatever //not /really/ proper thermodynamics but whatever

View File

@@ -112,7 +112,7 @@
//Returns the thermal energy change required to get to a new temperature //Returns the thermal energy change required to get to a new temperature
/datum/gas_mixture/proc/get_thermal_energy_change(var/new_temperature) /datum/gas_mixture/proc/get_thermal_energy_change(var/new_temperature)
return heat_capacity()*(new_temperature - temperature) return heat_capacity()*(max(new_temperature, 0) - temperature)
//Technically vacuum doesn't have a specific entropy. Just use a really big number (infinity would be ideal) here so that it's easy to add gas to vacuum and hard to take gas out. //Technically vacuum doesn't have a specific entropy. Just use a really big number (infinity would be ideal) here so that it's easy to add gas to vacuum and hard to take gas out.
#define SPECIFIC_ENTROPY_VACUUM 150000 #define SPECIFIC_ENTROPY_VACUUM 150000