From 59632e189757ab5c573e77d1d8100396d9c9c9ec Mon Sep 17 00:00:00 2001 From: Markolie Date: Sat, 29 Aug 2015 03:25:35 +0200 Subject: [PATCH] Add new variable instead of using blocked --- code/game/objects/items/weapons/dna_injector.dm | 2 +- code/modules/mob/living/damage_procs.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 0bfcd30ef15..87bd6a78d5d 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -62,7 +62,7 @@ /obj/item/weapon/dnainjector/proc/inject(mob/living/M as mob, mob/user as mob) if(istype(M,/mob/living)) - M.apply_effect(rand(10,25),IRRADIATE,-1) + M.apply_effect(rand(10,25),IRRADIATE,0,1) if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed // UI in syringe. diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index dfd271b1507..92a85a4ced3 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -44,7 +44,7 @@ -/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0) +/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/negate_armor = 0) blocked = (100-blocked)/100 if(!effect || (blocked <= 0)) return 0 @@ -59,7 +59,7 @@ halloss += effect // Useful for objects that cause "subdual" damage. PAIN! if(IRRADIATE) var/rad_damage = effect - if(blocked != -1) // Setting blocked to -1 overrides radiation armor checks, which are automatic otherwise + if(negate_armor) // Setting negate_armor overrides radiation armor checks, which are automatic otherwise rad_damage = max(effect * ((100-run_armor_check(null, "rad", "Your clothes feel warm.", "Your clothes feel warm."))/100),0) radiation += rad_damage if(SLUR)