From 6ae9afeb9d34c54cec2fb699132d43258f3a1011 Mon Sep 17 00:00:00 2001 From: Lucy Date: Wed, 16 Jul 2025 02:49:26 -0400 Subject: [PATCH 1/4] body temperature tweaks --- code/modules/mob/living/life.dm | 3 +++ code/modules/mob/living/living_defines.dm | 2 +- .../code/modules/temperature_overhaul/temperature_proc.dm | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index e038746da30fb..c78f47bd7cc8e 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -131,6 +131,9 @@ // Cap increase and decrease temp_change = temp_change < 0 ? max(temp_change, BODYTEMP_HOMEOSTASIS_COOLING_MAX) : min(temp_change, BODYTEMP_HOMEOSTASIS_HEATING_MAX) + // Boost when returning to equilibrium + if(equilibrium_temp < standard_body_temperature - 2 || equilibrium_temp > standard_body_temperature + 2) + temp_change *= 3 adjust_bodytemperature(temp_change * seconds_per_tick) // No use_insulation because we manually account for it diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 64f472ed98389..b2376816ee946 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -251,7 +251,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 diff --git a/monkestation/code/modules/temperature_overhaul/temperature_proc.dm b/monkestation/code/modules/temperature_overhaul/temperature_proc.dm index 54119cce91b42..6098526a1585d 100644 --- a/monkestation/code/modules/temperature_overhaul/temperature_proc.dm +++ b/monkestation/code/modules/temperature_overhaul/temperature_proc.dm @@ -95,6 +95,8 @@ if(amount == 0) return 0 amount = round(amount, 0.01) + min_temp = max(min_temp, TCMB) + max_temp = max(max_temp, 603.15) if(bodytemperature >= min_temp && bodytemperature <= max_temp) var/old_temp = bodytemperature From 844c90cbda4c711b6ca00770e575901f1c32b175 Mon Sep 17 00:00:00 2001 From: Lucy Date: Wed, 16 Jul 2025 02:52:59 -0400 Subject: [PATCH 2/4] pretty sure that's meant to be `min` --- .../code/modules/temperature_overhaul/temperature_proc.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkestation/code/modules/temperature_overhaul/temperature_proc.dm b/monkestation/code/modules/temperature_overhaul/temperature_proc.dm index 6098526a1585d..b95b7582635ff 100644 --- a/monkestation/code/modules/temperature_overhaul/temperature_proc.dm +++ b/monkestation/code/modules/temperature_overhaul/temperature_proc.dm @@ -96,7 +96,7 @@ return 0 amount = round(amount, 0.01) min_temp = max(min_temp, TCMB) - max_temp = max(max_temp, 603.15) + max_temp = min(max_temp, 603.15) if(bodytemperature >= min_temp && bodytemperature <= max_temp) var/old_temp = bodytemperature From f0f7e1d55a690930da4a13d384454dff234bbe37 Mon Sep 17 00:00:00 2001 From: Lucy Date: Wed, 16 Jul 2025 02:55:35 -0400 Subject: [PATCH 3/4] use `ISINRANGE_EX` macro for that --- code/modules/mob/living/life.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index c78f47bd7cc8e..355d129b440f7 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -132,7 +132,8 @@ // Cap increase and decrease temp_change = temp_change < 0 ? max(temp_change, BODYTEMP_HOMEOSTASIS_COOLING_MAX) : min(temp_change, BODYTEMP_HOMEOSTASIS_HEATING_MAX) // Boost when returning to equilibrium - if(equilibrium_temp < standard_body_temperature - 2 || equilibrium_temp > standard_body_temperature + 2) + + if(!ISINRANGE_EX(equilibrium_temp, standard_body_temperature - 2, standard_body_temperature + 2)) temp_change *= 3 adjust_bodytemperature(temp_change * seconds_per_tick) // No use_insulation because we manually account for it From acc520d368972d1943b79e1c67841e328a18282b Mon Sep 17 00:00:00 2001 From: Lucy Date: Wed, 16 Jul 2025 02:57:05 -0400 Subject: [PATCH 4/4] guh extra space --- code/modules/mob/living/life.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 355d129b440f7..653d5e20d4739 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -132,7 +132,6 @@ // Cap increase and decrease temp_change = temp_change < 0 ? max(temp_change, BODYTEMP_HOMEOSTASIS_COOLING_MAX) : min(temp_change, BODYTEMP_HOMEOSTASIS_HEATING_MAX) // Boost when returning to equilibrium - if(!ISINRANGE_EX(equilibrium_temp, standard_body_temperature - 2, standard_body_temperature + 2)) temp_change *= 3