diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 434e151dff1..3c43952edfc 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -46,8 +46,6 @@ #define ONESIZEFITSALL 0x2000 #define PHORONGUARD 0x4000 // Does not get contaminated by phoron. #define NOREACT 0x4000 // Reagents don't react inside this container. -#define BLOCKHEADHAIR 0x4 // Temporarily removes the user's hair overlay. Leaves facial hair. -#define BLOCKHAIR 0x8000 // Temporarily removes the user's hair, facial and otherwise. // Flags for pass_flags. #define PASSTABLE 0x1 @@ -69,6 +67,9 @@ #define HIDEEYES 0x4 // Glasses. #define HIDEFACE 0x8 // Dictates whether we appear as "Unknown". +#define BLOCKHEADHAIR 0x20 // Hides the user's hair overlay. Leaves facial hair. +#define BLOCKHAIR 0x40 // Hides the user's hair, facial and otherwise. + // Slots. #define slot_back 1 #define slot_wear_mask 2 diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index acb864c93ae..749a959fdfd 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -48,8 +48,8 @@ name = "magus helm" icon_state = "magus" desc = "A helm worn by the followers of Nar-Sie." - flags_inv = HIDEFACE - flags = HEADCOVERSMOUTH | BLOCKHAIR + flags_inv = HIDEFACE | BLOCKHAIR + flags = HEADCOVERSMOUTH body_parts_covered = HEAD|FACE|EYES /obj/item/clothing/head/culthood/alt diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 4fd49c8dcbe..e9bf5befef5 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -49,8 +49,8 @@ name = "gladiator helmet" desc = "Ave, Imperator, morituri te salutant." icon_state = "gladiator" - flags = HEADCOVERSMOUTH|BLOCKHAIR - flags_inv = HIDEMASK|HIDEEARS|HIDEEYES + flags = HEADCOVERSMOUTH + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|BLOCKHAIR body_parts_covered = HEAD|FACE siemens_coefficient = 1 diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 4793a772f3c..de9c66cf0b3 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -38,7 +38,7 @@ name = "chaplain's hood" desc = "It's hood that covers the head. It keeps you warm during the space winters." icon_state = "chaplain_hood" - flags = BLOCKHAIR + flags_inv = BLOCKHAIR body_parts_covered = HEAD //Chaplain @@ -46,7 +46,7 @@ name = "nun hood" desc = "Maximum piety in this star system." icon_state = "nun_hood" - flags = BLOCKHAIR + flags_inv = BLOCKHAIR body_parts_covered = HEAD //Mime @@ -95,7 +95,7 @@ name = "surgical cap" desc = "A cap surgeons wear during operations. Keeps their hair from tickling your internal organs." icon_state = "surgcap_blue" - flags = BLOCKHEADHAIR + flags_inv = BLOCKHEADHAIR /obj/item/clothing/head/surgery/purple desc = "A cap surgeons wear during operations. Keeps their hair from tickling your internal organs. This one is deep purple." diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 85c505b4f6f..e18da419955 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -56,7 +56,7 @@ name = "hastur's hood" desc = "It's unspeakably stylish" icon_state = "hasturhood" - flags = BLOCKHAIR + flags_inv = BLOCKHAIR body_parts_covered = HEAD|FACE|EYES /obj/item/clothing/head/nursehat @@ -74,8 +74,7 @@ ) icon_state = "syndicate" desc = "A plastic replica of a bloodthirsty mercenary's space helmet, you'll look just like a real murderous criminal operative in this! This is a toy, it is not made for use in space!" - flags = BLOCKHAIR - flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR siemens_coefficient = 2.0 body_parts_covered = HEAD|FACE|EYES @@ -84,8 +83,8 @@ desc = "A large, featureless white orb mean to be worn on your head. How do you even see out of this thing?" icon_state = "cueball" item_state = "cueball" - flags = HEADCOVERSMOUTH|BLOCKHAIR - flags_inv = 0 + flags = HEADCOVERSMOUTH + flags_inv = BLOCKHAIR body_parts_covered = HEAD|FACE|EYES /obj/item/clothing/head/greenbandana @@ -109,7 +108,8 @@ name = "justice hat" desc = "fight for what's righteous!" icon_state = "justicered" - flags = HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH + flags_inv = BLOCKHAIR body_parts_covered = HEAD|EYES /obj/item/clothing/head/justice/blue @@ -202,7 +202,7 @@ name = "witch costume wig" desc = "Eeeee~heheheheheheh!" icon_state = "witch" - flags = BLOCKHAIR + flags_inv = BLOCKHAIR siemens_coefficient = 2.0 /obj/item/clothing/head/chicken @@ -213,7 +213,7 @@ slot_l_hand_str = "chickensuit", slot_r_hand_str = "chickensuit", ) - flags = BLOCKHAIR + flags_inv = BLOCKHAIR siemens_coefficient = 0.7 body_parts_covered = HEAD|FACE|EYES @@ -221,7 +221,7 @@ name = "bear pelt hat" desc = "Fuzzy." icon_state = "bearpelt" - flags = BLOCKHAIR + flags_inv = BLOCKHAIR siemens_coefficient = 0.7 /obj/item/clothing/head/xenos @@ -232,8 +232,7 @@ slot_r_hand_str = "xenos_helm", ) desc = "A helmet made out of chitinous alien hide." - flags = BLOCKHAIR - flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR siemens_coefficient = 2.0 body_parts_covered = HEAD|FACE|EYES @@ -245,7 +244,7 @@ slot_l_hand_str = "pwig", slot_r_hand_str = "pwig", ) - flags = BLOCKHAIR + flags_inv = BLOCKHAIR siemens_coefficient = 2.0 //why is it so conductive?! body_parts_covered = 0 diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index d3179eaa80e..9eba8c74364 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -125,8 +125,8 @@ name = "carved pumpkin" desc = "A jack o' lantern! Believed to ward off evil spirits." icon_state = "hardhat0_pumpkin"//Could stand to be renamed - flags = HEADCOVERSMOUTH | BLOCKHAIR - flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE + flags = HEADCOVERSMOUTH + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES brightness_on = 2 light_overlay = "helmet_light" @@ -156,4 +156,5 @@ desc = "You can hear the distant sounds of rhythmic electronica." icon_state = "richard" body_parts_covered = HEAD|FACE - flags = HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH + flags_inv = BLOCKHAIR diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index ee03a328f7d..1ef6db4337d 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -3,8 +3,7 @@ desc = "LOADSAMONEY" icon_state = "balaclava" item_state = "balaclava" - flags = BLOCKHAIR - flags_inv = HIDEFACE + flags_inv = HIDEFACE|BLOCKHAIR body_parts_covered = FACE|HEAD w_class = 2 sprite_sheets = list( @@ -17,8 +16,7 @@ desc = "Designed to both hide identities and keep your face comfy and warm." icon_state = "swatclava" item_state = "balaclava" - flags = BLOCKHAIR - flags_inv = HIDEFACE + flags_inv = HIDEFACE|BLOCKHAIR w_class = 2 sprite_sheets = list( "Tajara" = 'icons/mob/species/tajaran/mask.dmi', @@ -30,8 +28,7 @@ desc = "Worn by robust fighters, flying high to defeat their foes!" icon_state = "luchag" item_state = "luchag" - flags = BLOCKHAIR - flags_inv = HIDEFACE + flags_inv = HIDEFACE|BLOCKHAIR body_parts_covered = HEAD|FACE w_class = 2 siemens_coefficient = 3.0 diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index f7b6ecbc6c5..9ca38f1fc0a 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -90,8 +90,7 @@ desc = "A rubber pig mask." icon_state = "pig" item_state = "pig" - flags = BLOCKHAIR - flags_inv = HIDEFACE + flags_inv = HIDEFACE|BLOCKHAIR w_class = 2 siemens_coefficient = 0.9 body_parts_covered = HEAD|FACE|EYES @@ -101,8 +100,7 @@ desc = "A mask made of soft vinyl and latex, representing the head of a horse." icon_state = "horsehead" item_state = "horsehead" - flags = BLOCKHAIR - flags_inv = HIDEFACE + flags_inv = HIDEFACE|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES w_class = 2 siemens_coefficient = 0.9 diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 064bf040881..b1dc5596ae0 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -4,8 +4,8 @@ icon_state = "capspace" item_state = "capspace" desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads." - flags = BLOCKHAIR | STOPPRESSUREDAMAGE - flags_inv = HIDEFACE + flags = STOPPRESSUREDAMAGE + flags_inv = HIDEFACE|BLOCKHAIR permeability_coefficient = 0.01 armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50) diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index f5cee89e1ef..152f065d377 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -37,7 +37,8 @@ slot_r_hand_str = "syndicate-helm-black-red", ) armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 100, rad = 60) - flags = BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL + flags = HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL + flags_inv = BLOCKHAIR siemens_coefficient = 0.6 //how is this a space helmet? @@ -46,7 +47,8 @@ desc = "An armored beret commonly used by special operations officers." icon_state = "beret_badge" armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30) - flags = BLOCKHAIR | STOPPRESSUREDAMAGE + flags = STOPPRESSUREDAMAGE + flags_inv = BLOCKHAIR siemens_coefficient = 0.9 //Space santa outfit suit @@ -55,7 +57,8 @@ desc = "Ho ho ho. Merrry X-mas!" icon_state = "santahat" item_state = "santahat" - flags = BLOCKHAIR | STOPPRESSUREDAMAGE + flags = STOPPRESSUREDAMAGE + flags_inv = BLOCKHAIR body_parts_covered = HEAD /obj/item/clothing/suit/space/santa @@ -74,7 +77,8 @@ icon_state = "pirate" item_state = "pirate" armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - flags = BLOCKHAIR | STOPPRESSUREDAMAGE + flags = STOPPRESSUREDAMAGE + flags_inv = BLOCKHAIR body_parts_covered = 0 siemens_coefficient = 0.9 diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index db44c39a033..9440993e6a6 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -4,8 +4,8 @@ /obj/item/clothing/head/helmet/space/rig name = "helmet" - flags = BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL - flags_inv = HIDEEARS|HIDEEYES|HIDEFACE + flags = HEADCOVERSMOUTH | THICKMATERIAL + flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES heat_protection = HEAD|FACE|EYES cold_protection = HEAD|FACE|EYES diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 0a962bd3d72..d08c4fab1a3 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -6,7 +6,8 @@ name = "Space helmet" icon_state = "space" desc = "A special helmet designed for work in a hazardous, low-pressure environment." - flags = BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT + flags = HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT + flags_inv = BLOCKHAIR item_state_slots = list( slot_l_hand_str = "s_helmet", slot_r_hand_str = "s_helmet", diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index df559903631..06fcd56bed9 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -8,9 +8,9 @@ ) desc = "A hood that protects the head and face from biological comtaminants." permeability_coefficient = 0.01 - flags = HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) - flags_inv = HIDEMASK|HIDEEARS|HIDEEYES + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES siemens_coefficient = 0.9 diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 64c43bc960c..74f1cc4d511 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -47,9 +47,9 @@ name = "bomb hood" desc = "Use in case of bomb." icon_state = "bombsuit" - flags = HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0) - flags_inv = HIDEMASK|HIDEEARS|HIDEEYES + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES siemens_coefficient = 0 @@ -86,7 +86,8 @@ name = "Radiation Hood" icon_state = "rad" desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation" - flags = HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH + flags_inv = BLOCKHAIR body_parts_covered = HEAD|FACE|EYES armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 4b10d1a3ef0..ae66cf3fe0e 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -116,19 +116,12 @@ This saves us from having to call add_fingerprint() any time something is put in update_inv_glasses() else if (W == head) head = null - - var/update_hair = 0 - if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)) - update_hair = 1 - else if(istype(W, /obj/item)) + if(istype(W, /obj/item)) var/obj/item/I = W - if(I.flags_inv & HIDEMASK) - update_hair = 1 - if(update_hair) - update_hair(0) //rebuild hair - update_inv_ears(0) - update_inv_wear_mask(0) - + if(I.flags_inv & (HIDEMASK|BLOCKHAIR|BLOCKHEADHAIR)) + update_hair(0) //rebuild hair + update_inv_ears(0) + update_inv_wear_mask(0) update_inv_head() else if (W == l_ear) l_ear = null @@ -144,9 +137,11 @@ This saves us from having to call add_fingerprint() any time something is put in update_inv_belt() else if (W == wear_mask) wear_mask = null - if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)) - update_hair(0) //rebuild hair - update_inv_ears(0) + if(istype(W, /obj/item)) + var/obj/item/I = W + if(I.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR)) + update_hair(0) //rebuild hair + update_inv_ears(0) if(internal) if(internals) internals.icon_state = "internal0" @@ -205,7 +200,7 @@ This saves us from having to call add_fingerprint() any time something is put in update_inv_back(redraw_mob) if(slot_wear_mask) src.wear_mask = W - if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR)) + if(wear_mask.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR)) update_hair(redraw_mob) //rebuild hair update_inv_ears(0) W.equipped(src, slot) @@ -261,7 +256,7 @@ This saves us from having to call add_fingerprint() any time something is put in update_inv_gloves(redraw_mob) if(slot_head) src.head = W - if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR) || (head.flags_inv & HIDEMASK)) + if(head.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR|HIDEMASK)) update_hair(redraw_mob) //rebuild hair update_inv_ears(0) update_inv_wear_mask(0) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index ad4db049c63..5fabab7688b 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -348,7 +348,7 @@ var/global/list/damage_icon_parts = list() return //masks and helmets can obscure our hair. - if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) + if( (head && (head.flags_inv & BLOCKHAIR)) || (wear_mask && (wear_mask.flags_inv & BLOCKHAIR))) if(update_icons) update_icons() return @@ -364,7 +364,7 @@ var/global/list/damage_icon_parts = list() face_standing.Blend(facial_s, ICON_OVERLAY) - if(h_style && !(head && (head.flags & BLOCKHEADHAIR))) + if(h_style && !(head && (head.flags_inv & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] if(hair_style && src.species.name in hair_style.species_allowed) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") @@ -573,7 +573,7 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/update_inv_ears(var/update_icons=1) overlays_standing[EARS_LAYER] = null - if( (head && (head.flags & (BLOCKHAIR | BLOCKHEADHAIR))) || (wear_mask && (wear_mask.flags & (BLOCKHAIR | BLOCKHEADHAIR)))) + if( (head && (head.flags_inv & (BLOCKHAIR | BLOCKHEADHAIR))) || (wear_mask && (wear_mask.flags_inv & (BLOCKHAIR | BLOCKHEADHAIR)))) if(update_icons) update_icons() return diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 15362abb5e4..9f1f39ed1f7 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -73,7 +73,7 @@ var/global/list/limb_icon_cache = list() facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD) overlays |= facial_s - if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR))) + if(owner.h_style && !(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style] if(hair_style && (species.name in hair_style.species_allowed)) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")