Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/modules/mob/living/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@
var/temp_change = temp_sign * (1 - (thermal_protection * protection_modifier)) * ((0.1 * max(1, abs(temp_delta))) ** 1.8) * temperature_normalization_speed
// Cap increase and decrease
temp_change = temp_change < 0 ? max(temp_change, BODYTEMP_ENVIRONMENT_COOLING_MAX) : min(temp_change, BODYTEMP_ENVIRONMENT_HEATING_MAX)
// Boost when returning to equilibrium
if(equilibrium_temp < standard_body_temperature - 2 KELVIN || equilibrium_temp > standard_body_temperature + 2 KELVIN)
temp_change *= 3

adjust_body_temperature(temp_change * seconds_per_tick) // no use_insulation beacuse we account for it manually

/mob/living/silicon/handle_environment(datum/gas_mixture/environment, seconds_per_tick, times_fired)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
/// Note that more of this = more nutrition is consumed every life tick.
var/temperature_homeostasis_speed = 0.5
/// Protection (insulation) from temperature changes, max 1
var/temperature_insulation = 0
var/temperature_insulation = 0.1

/// Whether we currently have temp alerts, minor optimization
VAR_PRIVATE/temp_alerts = FALSE
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
if(amount == 0)
return 0
amount = round(amount, 0.01)
min_temp = max(min_temp, TCMB)
max_temp = max(max_temp, CELCIUS_TO_KELVIN(330 CELCIUS))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that meant to be max(), rather than min()?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps should be a min


if(body_temperature >= min_temp && body_temperature <= max_temp)
var/old_temp = body_temperature
Expand Down
Loading