diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 92b66205b34..092ad2ce56b 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -395,7 +395,6 @@ item_state = "classicponcho" icon_override = 'icons/mob/ties.dmi' allowed = list(/obj/item/tank/emergency_oxygen,/obj/item/storage/bible,/obj/item/nullrod,/obj/item/reagent_containers/food/drinks/bottle/holywater) - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) slot_flags = SLOT_OCLOTHING | SLOT_TIE body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS siemens_coefficient = 0.9 diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 2733dff1a65..1214a4a7d62 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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() diff --git a/html/changelogs/mattatlas-armoredaccessories.yml b/html/changelogs/mattatlas-armoredaccessories.yml new file mode 100644 index 00000000000..84ed35b65b2 --- /dev/null +++ b/html/changelogs/mattatlas-armoredaccessories.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a system that allows the creation of armored accessories. Currently unused."