Merge pull request #4115 from Anewbe/modular_armor

Steals Bays modular armor, for later use
This commit is contained in:
Mechoid
2017-10-22 17:55:25 -07:00
committed by GitHub
7 changed files with 324 additions and 10 deletions
+68
View File
@@ -455,3 +455,71 @@
desc = "Pukish armor."
icon_state = "tdgreen"
siemens_coefficient = 1
//Modular plate carriers
/obj/item/clothing/suit/armor/pcarrier
name = "plate carrier"
desc = "A lightweight black plate carrier vest. It can be equipped with armor plates, but provides no protection of its own."
icon = 'icons/obj/clothing/modular_armor.dmi'
item_icons = list(slot_wear_suit_str = 'icons/mob/modular_armor.dmi')
icon_state = "pcarrier"
valid_accessory_slots = list(ACCESSORY_SLOT_INSIGNIA, ACCESSORY_SLOT_ARMOR_C, ACCESSORY_SLOT_ARMOR_A, ACCESSORY_SLOT_ARMOR_L, ACCESSORY_SLOT_ARMOR_S, ACCESSORY_SLOT_ARMOR_M)
restricted_accessory_slots = list(ACCESSORY_SLOT_INSIGNIA, ACCESSORY_SLOT_ARMOR_C, ACCESSORY_SLOT_ARMOR_A, ACCESSORY_SLOT_ARMOR_L, ACCESSORY_SLOT_ARMOR_S)
blood_overlay_type = "armor"
/obj/item/clothing/suit/armor/pcarrier/light
starting_accessories = list(/obj/item/clothing/accessory/armorplate)
/obj/item/clothing/suit/armor/pcarrier/light/sol
starting_accessories = list(/obj/item/clothing/accessory/armorplate, /obj/item/clothing/accessory/armor/tag)
/obj/item/clothing/suit/armor/pcarrier/light/nt
starting_accessories = list(/obj/item/clothing/accessory/armorplate, /obj/item/clothing/accessory/armor/tag/nt)
/obj/item/clothing/suit/armor/pcarrier/medium
starting_accessories = list(/obj/item/clothing/accessory/armorplate/medium, /obj/item/clothing/accessory/storage/pouches)
/obj/item/clothing/suit/armor/pcarrier/medium/sol
starting_accessories = list(/obj/item/clothing/accessory/armorplate/medium, /obj/item/clothing/accessory/storage/pouches, /obj/item/clothing/accessory/armor/tag)
/obj/item/clothing/suit/armor/pcarrier/medium/security
starting_accessories = list(/obj/item/clothing/accessory/armorplate/medium, /obj/item/clothing/accessory/storage/pouches, /obj/item/clothing/accessory/armor/tag/sec)
/obj/item/clothing/suit/armor/pcarrier/medium/command
starting_accessories = list(/obj/item/clothing/accessory/armorplate/medium, /obj/item/clothing/accessory/storage/pouches, /obj/item/clothing/accessory/armor/tag/com)
/obj/item/clothing/suit/armor/pcarrier/medium/nt
starting_accessories = list(/obj/item/clothing/accessory/armorplate/medium, /obj/item/clothing/accessory/storage/pouches, /obj/item/clothing/accessory/armor/tag/nt)
/obj/item/clothing/suit/armor/pcarrier/blue
name = "blue plate carrier"
desc = "A lightweight blue plate carrier vest. It can be equipped with armor plates, but provides no protection of its own."
icon_state = "pcarrier_blue"
/obj/item/clothing/suit/armor/pcarrier/blue/sol
name = "peacekeeper plate carrier"
desc = "A lightweight plate carrier vest in SCG Peacekeeper colors. It can be equipped with armor plates, but provides no protection of its own."
starting_accessories = list(/obj/item/clothing/accessory/armorplate/medium, /obj/item/clothing/accessory/storage/pouches/blue, /obj/item/clothing/accessory/armguards/blue, /obj/item/clothing/accessory/armor/tag)
/obj/item/clothing/suit/armor/pcarrier/green
name = "green plate carrier"
desc = "A lightweight green plate carrier vest. It can be equipped with armor plates, but provides no protection of its own."
icon_state = "pcarrier_green"
/obj/item/clothing/suit/armor/pcarrier/navy
name = "navy plate carrier"
desc = "A lightweight navy blue plate carrier vest. It can be equipped with armor plates, but provides no protection of its own."
icon_state = "pcarrier_navy"
/obj/item/clothing/suit/armor/pcarrier/tan
name = "tan plate carrier"
desc = "A lightweight tan plate carrier vest. It can be equipped with armor plates, but provides no protection of its own."
icon_state = "pcarrier_tan"
/obj/item/clothing/suit/armor/pcarrier/tan/tactical
name = "tactical plate carrier"
starting_accessories = list(/obj/item/clothing/accessory/armorplate/tactical, /obj/item/clothing/accessory/storage/pouches/large/tan)
/obj/item/clothing/suit/armor/pcarrier/merc
starting_accessories = list(/obj/item/clothing/accessory/armorplate/merc, /obj/item/clothing/accessory/armguards/merc, /obj/item/clothing/accessory/legguards/merc, /obj/item/clothing/accessory/storage/pouches/large)
@@ -0,0 +1,228 @@
//Pouches
/obj/item/clothing/accessory/storage/pouches
name = "storage pouches"
desc = "A collection of black pouches that can be attached to a plate carrier. Carries up to two items."
icon_override = 'icons/mob/modular_armor.dmi'
icon = 'icons/obj/clothing/modular_armor.dmi'
// accessory_icons = list(slot_tie_str = 'icons/mob/modular_armor.dmi', slot_wear_suit_str = 'icons/mob/modular_armor.dmi')
icon_state = "pouches"
gender = PLURAL
slot = ACCESSORY_SLOT_ARMOR_S
slots = 2
/obj/item/clothing/accessory/storage/pouches/blue
desc = "A collection of blue pouches that can be attached to a plate carrier. Carries up to two items."
icon_state = "pouches_blue"
/obj/item/clothing/accessory/storage/pouches/navy
desc = "A collection of navy blue pouches that can be attached to a plate carrier. Carries up to two items."
icon_state = "pouches_navy"
/obj/item/clothing/accessory/storage/pouches/green
desc = "A collection of green pouches that can be attached to a plate carrier. Carries up to two items."
icon_state = "pouches_green"
/obj/item/clothing/accessory/storage/pouches/tan
desc = "A collection of tan pouches that can be attached to a plate carrier. Carries up to two items."
icon_state = "pouches_tan"
/obj/item/clothing/accessory/storage/pouches/large
name = "large storage pouches"
desc = "A collection of black pouches that can be attached to a plate carrier. Carries up to four items."
icon_state = "lpouches"
slots = 4
/obj/item/clothing/accessory/storage/pouches/large/blue
desc = "A collection of blue pouches that can be attached to a plate carrier. Carries up to four items."
icon_state = "lpouches_blue"
/obj/item/clothing/accessory/storage/pouches/large/navy
desc = "A collection of navy blue pouches that can be attached to a plate carrier. Carries up to four items."
icon_state = "lpouches_navy"
/obj/item/clothing/accessory/storage/pouches/large/green
desc = "A collection of green pouches that can be attached to a plate carrier. Carries up to four items."
icon_state = "lpouches_green"
/obj/item/clothing/accessory/storage/pouches/large/tan
desc = "A collection of tan pouches that can be attached to a plate carrier. Carries up to four items."
icon_state = "lpouches_tan"
//Armor plates
/obj/item/clothing/accessory/armorplate
name = "light armor plate"
desc = "A basic armor plate made of steel-reinforced synthetic fibers. Attaches to a plate carrier."
icon = 'icons/obj/clothing/modular_armor.dmi'
icon_state = "armor_light"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
armor = list(melee = 30, bullet = 15, laser = 40, energy = 10, bomb = 25, bio = 0, rad = 0)
slot = ACCESSORY_SLOT_ARMOR_C
/obj/item/clothing/accessory/armorplate/medium
name = "medium armor plate"
desc = "A plasteel-reinforced synthetic armor plate, providing good protection. Attaches to a plate carrier."
icon_state = "armor_medium"
armor = list(melee = 40, bullet = 40, laser = 40, energy = 25, bomb = 30, bio = 0, rad = 0)
/obj/item/clothing/accessory/armorplate/tactical
name = "tactical armor plate"
desc = "A medium armor plate with additional ablative coating. Attaches to a plate carrier."
icon_state = "armor_tactical"
armor = list(melee = 40, bullet = 40, laser = 60, energy = 35, bomb = 30, bio = 0, rad = 0)
/obj/item/clothing/accessory/armorplate/merc
name = "heavy armor plate"
desc = "A ceramics-reinforced synthetic armor plate, providing state of of the art protection. Attaches to a plate carrier."
icon_state = "armor_heavy"
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0)
//Arm guards
/obj/item/clothing/accessory/armguards
name = "arm guards"
desc = "A pair of black arm pads reinforced with armor plating. Attaches to a plate carrier."
icon_override = 'icons/mob/modular_armor.dmi'
icon = 'icons/obj/clothing/modular_armor.dmi'
// accessory_icons = list(slot_tie_str = 'icons/mob/modular_armor.dmi', slot_wear_suit_str = 'icons/mob/modular_armor.dmi')
icon_state = "armguards"
gender = PLURAL
body_parts_covered = ARMS
armor = list(melee = 40, bullet = 40, laser = 40, energy = 25, bomb = 30, bio = 0, rad = 0)
slot = ACCESSORY_SLOT_ARMOR_A
/obj/item/clothing/accessory/armguards/blue
desc = "A pair of blue arm pads reinforced with armor plating. Attaches to a plate carrier."
icon_state = "armguards_blue"
/obj/item/clothing/accessory/armguards/navy
desc = "A pair of navy blue arm pads reinforced with armor plating. Attaches to a plate carrier."
icon_state = "armguards_navy"
/obj/item/clothing/accessory/armguards/green
desc = "A pair of green arm pads reinforced with armor plating. Attaches to a plate carrier."
icon_state = "armguards_green"
/obj/item/clothing/accessory/armguards/tan
desc = "A pair of tan arm pads reinforced with armor plating. Attaches to a plate carrier."
icon_state = "armguards_tan"
/obj/item/clothing/accessory/armguards/merc
name = "heavy arm guards"
desc = "A pair of red-trimmed black arm pads reinforced with heavy armor plating. Attaches to a plate carrier."
icon_state = "armguards_merc"
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0)
//Leg guards
/obj/item/clothing/accessory/legguards
name = "leg guards"
desc = "A pair of armored leg pads in black. Attaches to a plate carrier."
icon_override = 'icons/mob/modular_armor.dmi'
icon = 'icons/obj/clothing/modular_armor.dmi'
// accessory_icons = list(slot_tie_str = 'icons/mob/modular_armor.dmi', slot_wear_suit_str = 'icons/mob/modular_armor.dmi')
icon_state = "legguards"
gender = PLURAL
body_parts_covered = LEGS
armor = list(melee = 40, bullet = 40, laser = 40, energy = 25, bomb = 30, bio = 0, rad = 0)
slot = ACCESSORY_SLOT_ARMOR_L
/obj/item/clothing/accessory/legguards/blue
desc = "A pair of armored leg pads in blue. Attaches to a plate carrier."
icon_state = "legguards_blue"
/obj/item/clothing/accessory/legguards/navy
desc = "A pair of armored leg pads in navy blue. Attaches to a plate carrier."
icon_state = "legguards_navy"
/obj/item/clothing/accessory/legguards/green
desc = "A pair of armored leg pads in green. Attaches to a plate carrier."
icon_state = "legguards_green"
/obj/item/clothing/accessory/legguards/tan
desc = "A pair of armored leg pads in tan. Attaches to a plate carrier."
icon_state = "legguards_tan"
/obj/item/clothing/accessory/legguards/merc
name = "heavy leg guards"
desc = "A pair of heavily armored leg pads in red-trimmed black. Attaches to a plate carrier."
icon_state = "legguards_merc"
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0)
//Decorative attachments
/obj/item/clothing/accessory/armor/tag
name = "\improper SCG Flag"
desc = "An emblem depicting the Sol Central Government's flag."
icon_override = 'icons/mob/modular_armor.dmi'
icon = 'icons/obj/clothing/modular_armor.dmi'
// accessory_icons = list(slot_tie_str = 'icons/mob/modular_armor.dmi', slot_wear_suit_str = 'icons/mob/modular_armor.dmi')
icon_state = "solflag"
slot = ACCESSORY_SLOT_ARMOR_M
/obj/item/clothing/accessory/armor/tag/ec
name = "\improper Expeditionary Corps crest"
desc = "An emblem depicting the crest of the SCG Expeditionary Corps."
icon_state = "ecflag"
/obj/item/clothing/accessory/armor/tag/sec
name = "\improper POLICE tag"
desc = "An armor tag with the word POLICE printed in silver lettering on it."
icon_state = "sectag"
/obj/item/clothing/accessory/armor/tag/com
name = "\improper SCG tag"
desc = "An armor tag with the words SOL CENTRAL GOVERNMENT printed in gold lettering on it."
icon_state = "comtag"
/obj/item/clothing/accessory/armor/tag/nt
name = "\improper CORPORATE SECURITY tag"
desc = "An armor tag with the words CORPORATE SECURITY printed in red lettering on it."
icon_state = "nanotag"
/obj/item/clothing/accessory/armor/tag/pcrc
name = "\improper PCRC tag"
desc = "An armor tag with the words PROXIMA CENTAURI RISK CONTROL printed in cyan lettering on it."
icon_state = "pcrctag"
/obj/item/clothing/accessory/armor/tag/saare
name = "\improper SAARE tag"
desc = "An armor tag with the acronym SAARE printed in olive-green lettering on it."
icon_state = "saaretag"
/obj/item/clothing/accessory/armor/tag/opos
name = "\improper O+ blood patch"
desc = "An embroidered patch indicating the wearer's blood type as O POSITIVE."
icon_state = "opostag"
/obj/item/clothing/accessory/armor/tag/oneg
name = "\improper O- blood patch"
desc = "An embroidered patch indicating the wearer's blood type as O NEGATIVE."
icon_state = "onegtag"
/obj/item/clothing/accessory/armor/tag/apos
name = "\improper A+ blood patch"
desc = "An embroidered patch indicating the wearer's blood type as A POSITIVE."
icon_state = "apostag"
/obj/item/clothing/accessory/armor/tag/aneg
name = "\improper A- blood patch"
desc = "An embroidered patch indicating the wearer's blood type as A NEGATIVE."
icon_state = "anegtag"
/obj/item/clothing/accessory/armor/tag/bpos
name = "\improper B+ blood patch"
desc = "An embroidered patch indicating the wearer's blood type as B POSITIVE."
icon_state = "bpostag"
/obj/item/clothing/accessory/armor/tag/bneg
name = "\improper B- blood patch"
desc = "An embroidered patch indicating the wearer's blood type as B NEGATIVE."
icon_state = "bnegtag"
/obj/item/clothing/accessory/armor/tag/abpos
name = "\improper AB+ blood patch"
desc = "An embroidered patch indicating the wearer's blood type as AB POSITIVE."
icon_state = "abpostag"
/obj/item/clothing/accessory/armor/tag/abneg
name = "\improper AB- blood patch"
desc = "An embroidered patch indicating the wearer's blood type as AB NEGATIVE."
icon_state = "abnegtag"
@@ -149,22 +149,26 @@ 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)
protection += C.armor[type]
for(var/obj/item/clothing/gear in protective_gear)
if(gear.body_parts_covered & def_zone.body_part)
protection += gear.armor[type]
if(gear.accessories.len)
for(var/obj/item/clothing/accessory/bling in gear.accessories)
if(bling.body_parts_covered & def_zone.body_part)
protection += bling.armor[type]
return protection
/mob/living/carbon/human/proc/getsoak_organ(var/obj/item/organ/external/def_zone, var/type)
if(!type || !def_zone) return 0
var/soaked = 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)
soaked += C.armorsoak[type]
for(var/obj/item/clothing/gear in protective_gear)
if(gear.body_parts_covered & def_zone.body_part)
soaked += gear.armorsoak[type]
if(gear.accessories.len)
for(var/obj/item/clothing/accessory/bling in gear.accessories)
if(bling.body_parts_covered & def_zone.body_part)
soaked += bling.armorsoak[type]
return soaked
/mob/living/carbon/human/proc/check_head_coverage()