Prevents borers from getting through head coverage.

This commit is contained in:
Zuhayr
2013-12-19 10:38:21 +10:30
parent 11f8a5835f
commit 44ef03e439
2 changed files with 16 additions and 0 deletions
@@ -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)
@@ -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..."