Temperature Refactor and Fixes

This commit is contained in:
Robustin
2018-01-19 08:41:34 -06:00
committed by CitadelStationBot
parent c6f227fc18
commit 7a16f0a3ef
6 changed files with 71 additions and 59 deletions
@@ -66,13 +66,13 @@
var/loc_temp = get_temperature(environment)
if(stat != DEAD)
natural_bodytemperature_stabilization()
bodytemperature += natural_bodytemperature_stabilization()
if(!on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
if(loc_temp < bodytemperature)
bodytemperature += min(((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
else
bodytemperature += min(((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
bodytemperature += max(((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
switch(bodytemperature)