[MIRROR] Humans have more complicated body temperatures (#1825)

* Humans have more complicated body temperatures (#54550)

This changes how carbon/humans stabilize body temperature, and changes how damage and wounds are applied based on temperature.

Humans now have a core body temperature along with body temperature. The core temperature is used for natural stabilization and what viruses like fever and shivers target by raising or lowing the core temperature of the mob.
The standard body temperature still exists and acts exactly the same for most items at this time but is now treated as surface temperature in humans.

Damage from body temperature for humans is now based on the core temperature instead of body temperature now.
Humans will now receive burn wounds when the body (surface) temperature is to high for to long.

This causes you to see alerts for the area temperature before you take damage in most cases improving visibility of dangerous situations.

* Humans have more complicated body temperatures

Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
SkyratBot
2020-11-25 13:56:04 +01:00
committed by GitHub
co-authored by NightRed
parent d64fb339ce
commit a25041431b
22 changed files with 322 additions and 144 deletions
@@ -41,7 +41,6 @@ Bonus
unsafe = TRUE
if(A.properties["resistance"] >= 10)
power = 2.5
set_body_temp(A.affected_mob, A)
/datum/symptom/fever/Activate(datum/disease/advance/A)
if(!..())
@@ -51,6 +50,7 @@ Bonus
to_chat(M, "<span class='warning'>[pick("You feel hot.", "You feel like you're burning.")]</span>")
else
to_chat(M, "<span class='userdanger'>[pick("You feel too hot.", "You feel like your blood is boiling.")]</span>")
set_body_temp(A.affected_mob, A)
/**
* set_body_temp Sets the body temp change
@@ -61,7 +61,10 @@ Bonus
* * datum/disease/advance/A The disease applying the symptom
*/
/datum/symptom/fever/proc/set_body_temp(mob/living/M, datum/disease/advance/A)
M.add_body_temperature_change("fever", (6 * power) * A.stage)
if(!unsafe)
M.add_body_temperature_change("fever", max((6 * power) * A.stage, (BODYTEMP_HEAT_DAMAGE_LIMIT - 1)))
else
M.add_body_temperature_change("fever", max((6 * power) * A.stage, (BODYTEMP_HEAT_DAMAGE_LIMIT + 20)))
/// Update the body temp change based on the new stage
/datum/symptom/fever/on_stage_change(datum/disease/advance/A)
@@ -40,7 +40,6 @@ Bonus
unsafe = TRUE
if(A.properties["stage_rate"] >= 10)
power = 2.5
set_body_temp(A.affected_mob, A)
/datum/symptom/shivering/Activate(datum/disease/advance/A)
if(!..())
@@ -50,6 +49,7 @@ Bonus
to_chat(M, "<span class='warning'>[pick("You feel cold.", "You shiver.")]</span>")
else
to_chat(M, "<span class='userdanger'>[pick("You feel your blood run cold.", "You feel ice in your veins.", "You feel like you can't heat up.", "You shiver violently." )]</span>")
set_body_temp(A.affected_mob, A)
/**
* set_body_temp Sets the body temp change
@@ -60,7 +60,10 @@ Bonus
* * datum/disease/advance/A The disease applying the symptom
*/
/datum/symptom/shivering/proc/set_body_temp(mob/living/M, datum/disease/advance/A)
M.add_body_temperature_change("shivering", -((6 * power) * A.stage))
if(!unsafe)
M.add_body_temperature_change("shivering", max(-((6 * power) * A.stage), (BODYTEMP_COLD_DAMAGE_LIMIT + 1)))
else
M.add_body_temperature_change("shivering", max(-((6 * power) * A.stage), (BODYTEMP_COLD_DAMAGE_LIMIT - 20)))
/// Update the body temp change based on the new stage
/datum/symptom/shivering/on_stage_change(datum/disease/advance/A)
+3
View File
@@ -344,6 +344,9 @@
owner.adjustFireLoss(-25)
owner.remove_CC()
owner.bodytemperature = owner.get_body_temp_normal()
if(istype(owner, /mob/living/carbon/human))
var/mob/living/carbon/human/humi = owner
humi.coretemperature = humi.get_body_temp_normal()
return TRUE
/datum/status_effect/regenerative_core/on_remove()