Readds the old temperature notification method in the form of a shivering/sweating notification

This commit is contained in:
deathride58
2020-09-03 01:35:28 -04:00
parent da003edc4a
commit 1c9a22fa5e
3 changed files with 30 additions and 9 deletions

View File

@@ -184,14 +184,23 @@
/obj/screen/alert/hot
name = "Too Hot"
desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit."
desc = "The air around you is pretty toasty! Consider putting on some insulating clothing, or moving to a cooler area."
icon_state = "hot"
/obj/screen/alert/cold
name = "Too Cold"
desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit."
desc = "The air around you is pretty cold! Consider wearing a coat, or moving to a warmer area."
icon_state = "cold"
/obj/screen/alert/sweat
name = "Sweating"
desc = "You're sweating! Get somewhere cooler and take off any insulating clothing like a fire suit."
icon_state = "sweat"
/obj/screen/alert/shiver
name = "Shivering"
desc = "You're shivering! Get somewhere warmer and take off any insulating clothing like a space suit."
/obj/screen/alert/lowpressure
name = "Low Pressure"
desc = "The air around you is hazardously thin. A space suit would protect you."

View File

@@ -1956,19 +1956,19 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
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)
H.throw_alert("tempfeel", /obj/screen/alert/cold, 3)
if(-50 to -35)
H.throw_alert("temp", /obj/screen/alert/cold, 2)
H.throw_alert("tempfeel", /obj/screen/alert/cold, 2)
if(-35 to -20)
H.throw_alert("temp", /obj/screen/alert/cold, 1)
H.throw_alert("tempfeel", /obj/screen/alert/cold, 1)
if(-20 to 0) //This is the sweet spot where air is considered normal
H.clear_alert("temp")
H.clear_alert("tempfeel")
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)
H.throw_alert("tempfeel", /obj/screen/alert/hot, 1)
if(15 to 30)
H.throw_alert("temp", /obj/screen/alert/hot, 2)
H.throw_alert("tempfeel", /obj/screen/alert/hot, 2)
if(30 to INFINITY)
H.throw_alert("temp", /obj/screen/alert/hot, 3)
H.throw_alert("tempfeel", /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 && !HAS_TRAIT(H, TRAIT_RESISTHEAT))
@@ -1986,6 +1986,14 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
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/sweat, 1)
if(2 to 4)
H.throw_alert("temp", /obj/screen/alert/sweat, 2)
else
H.throw_alert("temp", /obj/screen/alert/sweat, 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")
@@ -1998,14 +2006,18 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/cold, multiplicative_slowdown = ((BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR))
switch(H.bodytemperature)
if(200 to BODYTEMP_COLD_DAMAGE_LIMIT)
H.throw_alert("temp", /obj/screen/alert/shiver, 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/shiver, 2)
H.apply_damage(COLD_DAMAGE_LEVEL_2*coldmod*H.physiology.cold_mod, BURN)
else
H.throw_alert("temp", /obj/screen/alert/shiver, 3)
H.apply_damage(COLD_DAMAGE_LEVEL_3*coldmod*H.physiology.cold_mod, BURN)
else
H.remove_movespeed_modifier(/datum/movespeed_modifier/cold)
H.clear_alert("temp")
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold")
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 112 KiB