diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 26adcda712f..88ced1da73b 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -92,7 +92,7 @@ emp_act var/datum/organ/external/organ = get_organ(check_zone(def_zone)) - var/armor = checkarmor(organ, "bullet") + var/armor = getarmor_organ(organ, "bullet") if((P.embed && prob(20 + max(P.damage - armor, -10))) && P.damage_type == BRUTE) var/obj/item/weapon/shard/shrapnel/SP = new() @@ -113,19 +113,20 @@ emp_act if(def_zone) if(isorgan(def_zone)) - return checkarmor(def_zone, type) - var/datum/organ/external/affecting = get_organ(ran_zone(def_zone)) - return checkarmor(affecting, type) + return getarmor_organ(def_zone, type) + var/datum/organ/external/affecting = get_organ(def_zone) + return getarmor_organ(affecting, type) //If a specific bodypart is targetted, check how that bodypart is protected and return the value. //If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values for(var/datum/organ/external/organ in organs) - armorval += checkarmor(organ, type) + armorval += getarmor_organ(organ, type) organnum++ return (armorval/max(organnum, 1)) -/mob/living/carbon/human/proc/checkarmor(var/datum/organ/external/def_zone, var/type) +//this proc returns the armour value for a particular external organ. +/mob/living/carbon/human/proc/getarmor_organ(var/datum/organ/external/def_zone, var/type) if(!type) return 0 var/protection = 0 var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 3aae384a0db..d15c2cf6dc9 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -32,6 +32,7 @@ return 0 +//if null is passed for def_zone, then this should return something appropriate for all zones (e.g. area effect damage) /mob/living/proc/getarmor(var/def_zone, var/type) return 0 diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index c36190f45f8..a7332fc5b92 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -259,7 +259,7 @@ if(istype(target, /mob/living/carbon/human)) - var/target_zone = check_zone(user.zone_sel.selecting, target) + var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target)) var/datum/organ/external/affecting = target:get_organ(target_zone) if (!affecting)