diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index 0c6d7e0322..858f1d4773 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -191,6 +191,11 @@ The box in your backpack has an oxygen tank and gas mask in it."
desc = "Your battery is about to die! Charge it ASAP!"
icon_state = "c_starving"
+/obj/screen/alert/warm
+ name = "Too Warm"
+ desc = "You're uncomfortably warm. Take off some clothes or tweak the thermostat a few degrees cooler."
+ icon_state = "mildhot"
+
/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."
@@ -199,6 +204,11 @@ The box in your backpack has an oxygen tank and gas mask in it."
/obj/screen/alert/hot/robot
desc = "The air around you is too hot for a humanoid. Be careful to avoid exposing them to this enviroment."
+/obj/screen/alert/chilly
+ name = "Too Chilly"
+ desc = "You're uncomfortably cold. Rug up or tweak the thermostat a few degrees higher."
+ icon_state = "mildcold"
+
/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."
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index b15924874e..124401844d 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -21,6 +21,16 @@
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
+#define COLD_ALERT_SEVERITY_LOW 1 // Constants passed to the cold and heat alerts.
+#define COLD_ALERT_SEVERITY_MODERATE 2
+#define COLD_ALERT_SEVERITY_MAX 3
+#define ENVIRONMENT_COMFORT_MARKER_COLD 1
+
+#define HOT_ALERT_SEVERITY_LOW 1
+#define HOT_ALERT_SEVERITY_MODERATE 2
+#define HOT_ALERT_SEVERITY_MAX 3
+#define ENVIRONMENT_COMFORT_MARKER_HOT 2
+
#define RADIATION_SPEED_COEFFICIENT 0.1
#define HUMAN_COMBUSTION_TEMP 524 //524k is the sustained combustion temperature of human fat
@@ -556,7 +566,7 @@
// Hot air hurts :(
- if((breath.temperature < species.breath_cold_level_1 || breath.temperature > species.breath_heat_level_1) && !(COLD_RESISTANCE in mutations))
+ if((breath.temperature <= species.cold_discomfort_level || breath.temperature >= species.heat_discomfort_level) && !(COLD_RESISTANCE in mutations))
if(breath.temperature <= species.breath_cold_level_1)
if(prob(20))
@@ -565,27 +575,37 @@
if(prob(20))
to_chat(src, "You feel your face burning and a searing heat in your lungs!")
- if(breath.temperature >= species.breath_heat_level_1)
- if(breath.temperature < species.breath_heat_level_2)
- apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat")
- throw_alert("temp", /obj/screen/alert/hot, 1)
- else if(breath.temperature < species.breath_heat_level_3)
- apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat")
- throw_alert("temp", /obj/screen/alert/hot, 2)
- else
+ if(breath.temperature >= species.heat_discomfort_level)
+
+ if(breath.temperature >= species.breath_heat_level_3)
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Heat")
- throw_alert("temp", /obj/screen/alert/hot, 3)
-
- else if(breath.temperature <= species.breath_cold_level_1)
- if(breath.temperature > species.breath_cold_level_2)
- apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold")
- throw_alert("temp", /obj/screen/alert/cold, 1)
- else if(breath.temperature > species.breath_cold_level_3)
- apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold")
- throw_alert("temp", /obj/screen/alert/cold, 2)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
+ else if(breath.temperature >= species.breath_heat_level_2)
+ apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat")
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
+ else if(breath.temperature >= species.breath_heat_level_1)
+ apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat")
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
+ else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_HOT))
+ throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
else
+ clear_alert("temp")
+
+ else if(breath.temperature <= species.cold_discomfort_level)
+
+ if(breath.temperature <= species.breath_cold_level_3)
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Cold")
- throw_alert("temp", /obj/screen/alert/cold, 3)
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
+ else if(breath.temperature <= species.breath_cold_level_2)
+ apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold")
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
+ else if(breath.temperature <= species.breath_cold_level_1)
+ apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold")
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
+ else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_COLD))
+ throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
+ else
+ clear_alert("temp")
//breathing in hot/cold air also heats/cools you a bit
var/temp_adj = breath.temperature - bodytemperature
@@ -597,15 +617,12 @@
var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
temp_adj *= relative_density
- if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
- if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
- //to_world("Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]")
- bodytemperature += temp_adj
+ if(temp_adj > BODYTEMP_HEATING_MAX)
+ temp_adj = BODYTEMP_HEATING_MAX
+ if(temp_adj < BODYTEMP_COOLING_MAX)
+ temp_adj = BODYTEMP_COOLING_MAX
- else if(breath.temperature >= species.heat_discomfort_level)
- species.get_environment_discomfort(src,"heat")
- else if(breath.temperature <= species.cold_discomfort_level)
- species.get_environment_discomfort(src,"cold")
+ bodytemperature += temp_adj
else
clear_alert("temp")
@@ -683,13 +700,13 @@
if(bodytemperature >= species.heat_level_2)
if(bodytemperature >= species.heat_level_3)
burn_dam = HEAT_DAMAGE_LEVEL_3
- throw_alert("temp", /obj/screen/alert/hot, 3)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
else
burn_dam = HEAT_DAMAGE_LEVEL_2
- throw_alert("temp", /obj/screen/alert/hot, 2)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
else
burn_dam = HEAT_DAMAGE_LEVEL_1
- throw_alert("temp", /obj/screen/alert/hot, 1)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
diff --git a/code/modules/mob/living/carbon/human/species/species_getters.dm b/code/modules/mob/living/carbon/human/species/species_getters.dm
index 7b635613ea..9053e66e0b 100644
--- a/code/modules/mob/living/carbon/human/species/species_getters.dm
+++ b/code/modules/mob/living/carbon/human/species/species_getters.dm
@@ -79,24 +79,23 @@
/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type)
- if(!prob(5))
- return
-
var/covered = 0 // Basic coverage can help.
for(var/obj/item/clothing/clothes in H)
if(H.item_is_in_hands(clothes))
continue
if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO))
- covered = 1
+ covered = TRUE
break
- switch(msg_type)
- if("cold")
- if(!covered)
- to_chat(H, "[pick(cold_discomfort_strings)]")
- if("heat")
- if(covered)
- to_chat(H, "[pick(heat_discomfort_strings)]")
+ var/discomfort_message
+ if(msg_type == ENVIRONMENT_COMFORT_MARKER_COLD && length(cold_discomfort_strings) && !covered)
+ discomfort_message = pick(cold_discomfort_strings)
+ else if(msg_type == ENVIRONMENT_COMFORT_MARKER_HOT && length(heat_discomfort_strings) && covered)
+ discomfort_message = pick(heat_discomfort_strings)
+
+ if(discomfort_message && prob(5))
+ to_chat(H, SPAN_DANGER(discomfort_message))
+ return !!discomfort_message
/datum/species/proc/get_random_name(var/gender)
if(!name_language)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 8a1f58f8ce..4e5e3629b7 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -263,15 +263,15 @@
if(environment)
switch(environment.temperature) //310.055 optimal body temp
if(400 to INFINITY)
- throw_alert("temp", /obj/screen/alert/hot/robot, 2)
+ throw_alert("temp", /obj/screen/alert/hot/robot, HOT_ALERT_SEVERITY_MODERATE)
if(360 to 400)
- throw_alert("temp", /obj/screen/alert/hot/robot, 1)
+ throw_alert("temp", /obj/screen/alert/hot/robot, HOT_ALERT_SEVERITY_LOW)
if(260 to 360)
clear_alert("temp")
if(200 to 260)
- throw_alert("temp", /obj/screen/alert/cold/robot, 1)
+ throw_alert("temp", /obj/screen/alert/cold/robot, COLD_ALERT_SEVERITY_LOW)
else
- throw_alert("temp", /obj/screen/alert/cold/robot, 2)
+ throw_alert("temp", /obj/screen/alert/cold/robot, COLD_ALERT_SEVERITY_MODERATE)
//Oxygen and fire does nothing yet!!
// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
diff --git a/code/modules/mob/living/simple_mob/life.dm b/code/modules/mob/living/simple_mob/life.dm
index cb973ce16d..82514d3548 100644
--- a/code/modules/mob/living/simple_mob/life.dm
+++ b/code/modules/mob/living/simple_mob/life.dm
@@ -127,10 +127,10 @@
//Atmos effect
if(bodytemperature < minbodytemp)
adjustFireLoss(cold_damage_per_tick)
- throw_alert("temp", /obj/screen/alert/cold, 3)
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
else if(bodytemperature > maxbodytemp)
adjustFireLoss(heat_damage_per_tick)
- throw_alert("temp", /obj/screen/alert/hot, 3)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
else
clear_alert("temp")
diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi
index f762fe371c..e2abc031b1 100644
Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ