From 1c3891582e92494978b180121abac2bc0d2bdcda Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sat, 1 Jan 2022 19:35:16 +0100 Subject: [PATCH] =?UTF-8?q?robots=20have=20-125=C2=B0=20cold=20temp=20tole?= =?UTF-8?q?rance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit title. They will only take cold damage (and slowdown) once they are *really* cold (e.g. icethrowers or supercooled environments), as their internal components struggle to compensate and their coolant starts to freeze. --- code/modules/mob/living/carbon/human/species.dm | 10 +++++++--- .../living/carbon/human/species_types/anthropomorph.dm | 1 + .../mob/living/carbon/human/species_types/ipc.dm | 1 + .../mob/living/carbon/human/species_types/synthliz.dm | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 5a2a632af2..0bd0bb24a2 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -108,6 +108,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/burnmod = 1 ///multiplier for damage from cold temperature var/coldmod = 1 + ///moves their safe minimum temp by this value. + var/cold_offset = 0 + ///moves their safe maximum temp by this value. + var/hot_offset = 0 ///multiplier for damage from hot temperature var/heatmod = 1 ///multiplier for stun durations @@ -2215,7 +2219,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) H.throw_alert("tempfeel", /atom/movable/screen/alert/hot, 3) // +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt. - if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTHEAT)) + if(H.bodytemperature > (BODYTEMP_HEAT_DAMAGE_LIMIT + hot_offset) && !HAS_TRAIT(H, TRAIT_RESISTHEAT)) //Body temperature is too hot. SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold") @@ -2243,11 +2247,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) H.emote("scream") H.apply_damage(burn_damage, BURN) - else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) + else if(H.bodytemperature < (BODYTEMP_COLD_DAMAGE_LIMIT + cold_offset) && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot") SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "cold", /datum/mood_event/cold) //Apply cold slowdown - H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/cold, multiplicative_slowdown = ((BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR)) + H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/cold, multiplicative_slowdown = (((BODYTEMP_COLD_DAMAGE_LIMIT + cold_offset) - H.bodytemperature) / COLD_SLOWDOWN_FACTOR)) switch(H.bodytemperature) if(200 to BODYTEMP_COLD_DAMAGE_LIMIT) H.throw_alert("temp", /atom/movable/screen/alert/shiver, 1) diff --git a/code/modules/mob/living/carbon/human/species_types/anthropomorph.dm b/code/modules/mob/living/carbon/human/species_types/anthropomorph.dm index 6303a474c9..744375db9c 100644 --- a/code/modules/mob/living/carbon/human/species_types/anthropomorph.dm +++ b/code/modules/mob/living/carbon/human/species_types/anthropomorph.dm @@ -32,6 +32,7 @@ coldmod = 0.5 heatmod = 1.2 + cold_offset = -125 //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas blacklisted_quirks = list(/datum/quirk/coldblooded) balance_point_values = TRUE diff --git a/code/modules/mob/living/carbon/human/species_types/ipc.dm b/code/modules/mob/living/carbon/human/species_types/ipc.dm index f3e245bb5d..4f6b940692 100644 --- a/code/modules/mob/living/carbon/human/species_types/ipc.dm +++ b/code/modules/mob/living/carbon/human/species_types/ipc.dm @@ -15,6 +15,7 @@ coldmod = 0.5 heatmod = 1.2 + cold_offset = -125 //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas blacklisted_quirks = list(/datum/quirk/coldblooded) balance_point_values = TRUE diff --git a/code/modules/mob/living/carbon/human/species_types/synthliz.dm b/code/modules/mob/living/carbon/human/species_types/synthliz.dm index d3752dee15..7fc2da1132 100644 --- a/code/modules/mob/living/carbon/human/species_types/synthliz.dm +++ b/code/modules/mob/living/carbon/human/species_types/synthliz.dm @@ -12,6 +12,7 @@ coldmod = 0.5 heatmod = 1.2 + cold_offset = -125 //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas blacklisted_quirks = list(/datum/quirk/coldblooded) balance_point_values = TRUE