Makes the temperature notification more realistic by making the notification look for the difference between body temperature and ambient temperature instead of only looking at body temp (#8025)
This commit is contained in:
@@ -1739,6 +1739,21 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
H.adjust_bodytemperature((thermal_protection+1)*natural + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
|
||||
else //we're sweating, insulation hinders out ability to reduce heat - but will reduce the amount of heat we get from the environment
|
||||
H.adjust_bodytemperature(natural*(1/(thermal_protection+1)) + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
|
||||
switch((loc_temp - H.bodytemperature)*thermal_protection)
|
||||
if(-INFINITY to -50)
|
||||
H.throw_alert("temp", /obj/screen/alert/cold, 3)
|
||||
if(-50 to -35)
|
||||
H.throw_alert("temp", /obj/screen/alert/cold, 2)
|
||||
if(-35 to -20)
|
||||
H.throw_alert("temp", /obj/screen/alert/cold, 1)
|
||||
if(-20 to 0) //This is the sweet spot where air is considered normal
|
||||
H.clear_alert("temp")
|
||||
if(0 to 15) //When the air around you matches your body's temperature, you'll start to feel warm.
|
||||
H.throw_alert("temp", /obj/screen/alert/hot, 1)
|
||||
if(15 to 30)
|
||||
H.throw_alert("temp", /obj/screen/alert/hot, 2)
|
||||
if(30 to INFINITY)
|
||||
H.throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
|
||||
// +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt.
|
||||
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !H.has_trait(TRAIT_RESISTHEAT))
|
||||
@@ -1754,14 +1769,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
else
|
||||
firemodifier = min(firemodifier, 0)
|
||||
burn_damage = max(log(2-firemodifier,(H.bodytemperature-BODYTEMP_NORMAL))-5,0) // this can go below 5 at log 2.5
|
||||
if (burn_damage)
|
||||
switch(burn_damage)
|
||||
if(0 to 2)
|
||||
H.throw_alert("temp", /obj/screen/alert/hot, 1)
|
||||
if(2 to 4)
|
||||
H.throw_alert("temp", /obj/screen/alert/hot, 2)
|
||||
else
|
||||
H.throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
burn_damage = burn_damage * heatmod * H.physiology.heat_mod
|
||||
if (H.stat < UNCONSCIOUS && (prob(burn_damage) * 10) / 4) //40% for level 3 damage on humans
|
||||
H.emote("scream")
|
||||
@@ -1772,17 +1779,13 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "cold", /datum/mood_event/cold)
|
||||
switch(H.bodytemperature)
|
||||
if(200 to BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
H.throw_alert("temp", /obj/screen/alert/cold, 1)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_1*coldmod*H.physiology.cold_mod, BURN)
|
||||
if(120 to 200)
|
||||
H.throw_alert("temp", /obj/screen/alert/cold, 2)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_2*coldmod*H.physiology.cold_mod, BURN)
|
||||
else
|
||||
H.throw_alert("temp", /obj/screen/alert/cold, 3)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_3*coldmod*H.physiology.cold_mod, BURN)
|
||||
|
||||
else
|
||||
H.clear_alert("temp")
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold")
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user