From 6f33856ae7e8497bbf5fb728f252ce782dc007ef Mon Sep 17 00:00:00 2001 From: Ghommie Date: Sun, 28 Jul 2019 18:51:19 +0200 Subject: [PATCH] Makes staminaloss also apply the oxyloss fullscreen overlay. --- code/modules/mob/living/carbon/carbon.dm | 5 +++-- code/modules/mob/living/carbon/carbon_defines.dm | 1 + code/modules/mob/living/carbon/human/species.dm | 1 + code/modules/mob/living/carbon/life.dm | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index aa87a6e46d..e94a6eac86 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -699,9 +699,10 @@ clear_fullscreen("critvision") //Oxygen damage overlay - if(oxyloss) + var/windedup = getOxyLoss() + getStaminaLoss() * 0.2 + stamdamageoverlaytemp + if(windedup) var/severity = 0 - switch(oxyloss) + switch(windedup) if(10 to 20) severity = 1 if(20 to 25) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index f782289e18..e9114d5298 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -61,5 +61,6 @@ var/next_hallucination = 0 var/cpr_time = 1 //CPR cooldown. var/damageoverlaytemp = 0 + var/stamdamageoverlaytemp = 0 var/drunkenness = 0 //Overall drunkenness - check handle_alcohol() in life.dm for effects diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 37e5da2f84..076b8efb66 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1781,6 +1781,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(CLONE) H.adjustCloneLoss(damage * hit_percent * H.physiology.clone_mod) if(STAMINA) + H.stamdamageoverlaytemp = 20 if(BP) if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod), only_robotic = FALSE, only_organic = FALSE)) H.update_stamina() diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 9dd55c361e..ec80da6b53 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -4,8 +4,9 @@ if(notransform) return - if(damageoverlaytemp) + if(damageoverlaytemp || stamdamageoverlaytemp) damageoverlaytemp = 0 + stamdamageoverlaytemp = 0 update_damage_hud() if(stat != DEAD) //Reagent processing needs to come before breathing, to prevent edge cases.