From 44ef03e43964ec6c745ad3ab167afb4b945a4ae8 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 19 Dec 2013 10:38:21 +1030 Subject: [PATCH] Prevents borers from getting through head coverage. --- code/modules/mob/living/carbon/human/human_defense.dm | 10 ++++++++++ code/modules/mob/living/simple_animal/borer.dm | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 16a4733b276..b1a20b144ed 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -134,6 +134,16 @@ emp_act protection += C.armor[type] return protection +/mob/living/carbon/human/proc/check_head_coverage() + + var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform) + for(var/bp in body_parts) + if(!bp) continue + if(bp && istype(bp ,/obj/item/clothing)) + var/obj/item/clothing/C = bp + if(C.body_parts_covered & HEAD) + return 1 + return 0 /mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack") if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3) diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index 8a9bf699b48..d3e0ea9518e 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -368,6 +368,12 @@ mob/living/simple_animal/borer/proc/detatch() src << "You cannot infest someone who is already infested!" return + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.check_head_coverage()) + src << "You cannot get through that host's protective gear." + return + M << "Something slimy begins probing at the opening of your ear canal..." src << "You slither up [M] and begin probing at their ear canal..."