From 5cf9b048a5f85bc5f01dfb9b261222dc23c8234d Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 18 Mar 2023 11:20:10 +0100 Subject: [PATCH] [MIRROR] Stabilized Orange can no longer cool you infinitely fast [MDB IGNORE] (#19920) * Stabilized Orange can no longer cool you infinitely fast (#74027) ## About The Pull Request Closes https://github.com/tgstation/tgstation/issues/73923 ### Mapping March Ckey to receive rewards: N/A ## Why It's Good For The Game ## Changelog :cl: fix: Stabilized Orange extracts are no longer able to cool you from any temperature instantly /:cl: * Stabilized Orange can no longer cool you infinitely fast --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> --- .../crossbreeding/_status_effects.dm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index dccf1761b13..58faffc2015 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -481,11 +481,20 @@ colour = "orange" /datum/status_effect/stabilized/orange/tick() - var/body_temperature_difference = owner.get_body_temp_normal(apply_change=FALSE) - owner.bodytemperature - owner.adjust_bodytemperature(min(5, body_temperature_difference)) + var/body_temp_target = owner.get_body_temp_normal(apply_change = FALSE) + + var/body_temp_actual = owner.bodytemperature + var/body_temp_offset = body_temp_target - body_temp_actual + body_temp_offset = clamp(body_temp_offset, -5, 5) + owner.adjust_bodytemperature(body_temp_offset) + if(ishuman(owner)) - var/mob/living/carbon/human/humi = owner - humi.adjust_coretemperature(min(5, humi.get_body_temp_normal(apply_change=FALSE) - humi.coretemperature)) + var/mob/living/carbon/human/human = owner + var/core_temp_actual = human.coretemperature + var/core_temp_offset = body_temp_target - core_temp_actual + core_temp_offset = clamp(core_temp_offset, -5, 5) + human.adjust_coretemperature(core_temp_offset) + return ..() /datum/status_effect/stabilized/purple