diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 0a8598d21f..7c80895a81 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -22,6 +22,19 @@ #define SLOT_TIE 0x4000 #define SLOT_HOLSTER 0x8000 //16th bit - higher than this will overflow +#define ACCESSORY_SLOT_UTILITY "Utility" +#define ACCESSORY_SLOT_ARMBAND "Armband" +#define ACCESSORY_SLOT_RANK "Rank" +#define ACCESSORY_SLOT_DEPT "Department" +#define ACCESSORY_SLOT_DECOR "Decor" +#define ACCESSORY_SLOT_MEDAL "Medal" +#define ACCESSORY_SLOT_INSIGNIA "Insignia" +#define ACCESSORY_SLOT_ARMOR_C "Chest armor" +#define ACCESSORY_SLOT_ARMOR_A "Arm armor" +#define ACCESSORY_SLOT_ARMOR_L "Leg armor" +#define ACCESSORY_SLOT_ARMOR_S "Armor storage" +#define ACCESSORY_SLOT_ARMOR_M "Misc armor" + // Flags bitmasks. #define NOBLUDGEON 0x1 // When an item has this it produces no "X has been hit by Y with Z" message with the default handler. #define CONDUCT 0x2 // Conducts electricity. (metal etc.) diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 68b656f0d7..864ee369ba 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -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) + diff --git a/code/modules/clothing/under/accessories/armor.dm b/code/modules/clothing/under/accessories/armor.dm new file mode 100644 index 0000000000..0caa62b2a2 --- /dev/null +++ b/code/modules/clothing/under/accessories/armor.dm @@ -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" diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index e37be0e032..87246e3fe4 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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() diff --git a/icons/mob/modular_armor.dmi b/icons/mob/modular_armor.dmi new file mode 100644 index 0000000000..2c7d8ea841 Binary files /dev/null and b/icons/mob/modular_armor.dmi differ diff --git a/icons/obj/clothing/modular_armor.dmi b/icons/obj/clothing/modular_armor.dmi new file mode 100644 index 0000000000..89ef66aa8c Binary files /dev/null and b/icons/obj/clothing/modular_armor.dmi differ diff --git a/polaris.dme b/polaris.dme index 551c3d2775..920bb93abe 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1350,6 +1350,7 @@ #include "code\modules\clothing\under\syndicate.dm" #include "code\modules\clothing\under\accessories\accessory.dm" #include "code\modules\clothing\under\accessories\armband.dm" +#include "code\modules\clothing\under\accessories\armor.dm" #include "code\modules\clothing\under\accessories\badges.dm" #include "code\modules\clothing\under\accessories\clothing.dm" #include "code\modules\clothing\under\accessories\holster.dm"