mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixes freezers never quite reaching their thermostat temperature
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
cooling = 1
|
||||
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
|
||||
//not /really/ proper thermodynamics but whatever
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
//Returns the thermal energy change required to get to a 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.
|
||||
#define SPECIFIC_ENTROPY_VACUUM 150000
|
||||
|
||||
Reference in New Issue
Block a user