diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6498724b586..8ebd68b16b3 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -549,22 +549,16 @@ . = FALSE else if(HAS_TRAIT(src, TRAIT_PIERCEIMMUNE)) . = FALSE - // If targeting the head, see if the head item is thin enough. - // If targeting anything else, see if the wear suit is thin enough. - if (!penetrate_thick) - if(above_neck(target_zone)) - if(head && istype(head, /obj/item/clothing)) - var/obj/item/clothing/CH = head - if (CH.clothing_flags & THICKMATERIAL) - . = FALSE - else - if(wear_suit && istype(wear_suit, /obj/item/clothing)) - var/obj/item/clothing/CS = wear_suit - if (CS.clothing_flags & THICKMATERIAL) - . = FALSE + var/obj/item/bodypart/the_part = get_bodypart(target_zone) || get_bodypart(BODY_ZONE_CHEST) + // Loop through the clothing covering this bodypart and see if there's any thiccmaterials + if(!penetrate_thick) + for(var/obj/item/clothing/iter_clothing in clothingonpart(the_part)) + if(iter_clothing.clothing_flags & THICKMATERIAL) + . = FALSE + break if(!. && error_msg && user) // Might need re-wording. - to_chat(user, "There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].") + to_chat(user, "There is no exposed flesh or thin material on [p_their()] [the_part.name].") /mob/living/carbon/human/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) if(judgement_criteria & JUDGE_EMAGGED)