From bb1a50c24b33cc920bb322daf9b0de08a01c765e Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Sat, 11 Jul 2020 14:31:45 -0400 Subject: [PATCH] fixes radiation immune mobs getting irradiated (#52090) --- code/modules/mob/living/damage_procs.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index d282a0f1c5d..f19bb794e0a 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -92,7 +92,7 @@ /mob/living/proc/apply_effect(effect = 0,effecttype = EFFECT_STUN, blocked = FALSE) var/hit_percent = (100-blocked)/100 if(!effect || (hit_percent <= 0)) - return 0 + return FALSE switch(effecttype) if(EFFECT_STUN) Stun(effect * hit_percent) @@ -105,7 +105,8 @@ if(EFFECT_UNCONSCIOUS) Unconscious(effect * hit_percent) if(EFFECT_IRRADIATE) - radiation += max(effect * hit_percent, 0) + if(!HAS_TRAIT(src, TRAIT_RADIMMUNE)) + radiation += max(effect * hit_percent, 0) if(EFFECT_SLUR) slurring = max(slurring,(effect * hit_percent)) if(EFFECT_STUTTER) @@ -118,7 +119,7 @@ if(EFFECT_JITTER) if((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) jitteriness = max(jitteriness,(effect * hit_percent)) - return 1 + return TRUE /// applies multiple effects at once via [/mob/living/proc/apply_effect] /mob/living/proc/apply_effects(stun = 0, knockdown = 0, unconscious = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = FALSE, stamina = 0, jitter = 0, paralyze = 0, immobilize = 0)