Adds a framework for armored accessories. (#8112)

This commit is contained in:
Matt Atlas
2020-01-30 23:56:22 +01:00
committed by GitHub
parent 2c71223730
commit dfcb20847f
3 changed files with 48 additions and 6 deletions
@@ -132,11 +132,13 @@ emp_act
if(!type || !def_zone) return 0
var/protection = 0
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes)
for(var/gear in protective_gear)
if(gear && istype(gear ,/obj/item/clothing))
var/obj/item/clothing/C = gear
if(istype(C) && C.body_parts_covered & def_zone.body_part && C.armor)
protection = add_armor(protection, C.armor[type])
for(var/obj/item/clothing/gear in protective_gear)
if(gear.body_parts_covered & def_zone.body_part)
protection = add_armor(protection, gear.armor[type])
for(var/obj/item/clothing/accessory/A in gear.accessories)
if(A.body_parts_covered & def_zone.body_part)
protection = add_armor(protection, A.armor[type])
return protection
/mob/living/carbon/human/proc/check_head_coverage()