From f054ae6288fc306f61c33c1e46c9d00bdb419139 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Tue, 16 Jun 2020 21:40:50 +0100 Subject: [PATCH] appease our great linter overlord --- code/modules/mob/living/carbon/carbon_defense.dm | 4 ++-- code/modules/mob/living/living_defense.dm | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index ca7547cc94..41a034ecd8 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -274,8 +274,8 @@ to_chat(M, "You can't put [p_them()] out with just your bare hands!") return - if(M == src && check_self_for_injuries()) - return + if(M == src && check_self_for_injuries()) + return if(health >= 0 && !(HAS_TRAIT(src, TRAIT_FAKEDEATH))) var/friendly_check = FALSE diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 3df07a6101..d0aff933b5 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -1,6 +1,9 @@ -/mob/living/proc/run_armor_check(def_zone = null, attack_flag = "melee", absorb_text = "Your armor absorbs the blow!", soften_text = "Your armor softens the blow!", armour_penetration, penetrated_text = "Your armor was penetrated!") +/mob/living/proc/run_armor_check(def_zone = null, attack_flag = "melee", absorb_text = "Your armor absorbs the blow!", soften_text = "Your armor softens the blow!", armour_penetration, penetrated_text = "Your armor was penetrated!", silent=FALSE) var/armor = getarmor(def_zone, attack_flag) + + if(silent) + return max(0, armor - armour_penetration) //the if "armor" check is because this is used for everything on /living, including humans if(armor && armour_penetration)