diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 7d734339bb4..fcabee7b2e3 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -186,6 +186,7 @@ BLIND // can't see anything slot_flags = SLOT_OCLOTHING var/blood_overlay_type = "suit" siemens_coefficient = 0.9 + var/collar = 0 //Spacesuit //Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together. diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index f888a6c7134..49e91c1ca07 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -80,6 +80,7 @@ icon_state = "bombsuitsec" item_state = "bombsuitsec" allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) + collar = 1 /* * Radiation protection diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 6063f544d62..4e676ec3ee2 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -113,13 +113,14 @@ Please contact me on #coderbus IRC. ~Carn x #define HAIR_LAYER 14 //TODO: make part of head layer? #define FACEMASK_LAYER 15 #define HEAD_LAYER 16 -#define HANDCUFF_LAYER 17 -#define LEGCUFF_LAYER 18 -#define L_HAND_LAYER 19 -#define R_HAND_LAYER 20 -#define TAIL_LAYER 21 //bs12 specific. this hack is probably gonna come back to haunt me -#define TARGETED_LAYER 22 //BS12: Layer for the target overlay from weapon targeting system -#define TOTAL_LAYERS 22 +#define COLLAR_LAYER 17 +#define HANDCUFF_LAYER 18 +#define LEGCUFF_LAYER 19 +#define L_HAND_LAYER 20 +#define R_HAND_LAYER 21 +#define TAIL_LAYER 22 //bs12 specific. this hack is probably gonna come back to haunt me +#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system +#define TOTAL_LAYERS 24 ////////////////////////////////// /mob/living/carbon/human @@ -620,6 +621,8 @@ proc/get_damage_icon_part(damage_state, body_part) update_tail_showing(0) + update_collar(0) + if(update_icons) update_icons() /mob/living/carbon/human/update_inv_pockets(var/update_icons=1) @@ -714,6 +717,22 @@ proc/get_damage_icon_part(damage_state, body_part) if(update_icons) update_icons() + +//Adds a collar overlay above the helmet layer if the suit has one +// Suit needs an identically named sprite in icons/mob/collar.dmi +// Suit also needs 'collar = 1' set +/mob/living/carbon/human/proc/update_collar(var/update_icons=1) + if(wear_suit) + if(wear_suit:collar) //hackish - but checks before getting to this point anyway + overlays_standing[COLLAR_LAYER] = image("icon" = 'icons/mob/collar.dmi', "icon_state" = "[wear_suit.icon_state]") + else + overlays_standing[COLLAR_LAYER] = null + else + overlays_standing[COLLAR_LAYER] = null + + if(update_icons) update_icons() + + // Used mostly for creating head items /mob/living/carbon/human/proc/generate_head_icon() //gender no longer matters for the mouth, although there should probably be seperate base head icons. @@ -766,6 +785,7 @@ proc/get_damage_icon_part(damage_state, body_part) #undef BACK_LAYER #undef HAIR_LAYER #undef HEAD_LAYER +#undef COLLAR_LAYER #undef HANDCUFF_LAYER #undef LEGCUFF_LAYER #undef L_HAND_LAYER diff --git a/icons/mob/collar.dmi b/icons/mob/collar.dmi new file mode 100644 index 00000000000..fccfe6dd53b Binary files /dev/null and b/icons/mob/collar.dmi differ