diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm index 0e74052c2a..d3b7b19fdd 100644 --- a/code/ZAS/Phoron.dm +++ b/code/ZAS/Phoron.dm @@ -97,14 +97,14 @@ obj/var/contaminated = 0 if(!wear_mask) burn_eyes() else - if(!(wear_mask.flags & MASKCOVERSEYES)) + if(!(wear_mask.body_parts_covered & EYES)) burn_eyes() else - if(!(head.flags & HEADCOVERSEYES)) + if(!(head.body_parts_covered & EYES)) if(!wear_mask) burn_eyes() else - if(!(wear_mask.flags & MASKCOVERSEYES)) + if(!(wear_mask.body_parts_covered & EYES)) burn_eyes() //Genetic Corruption @@ -135,7 +135,7 @@ obj/var/contaminated = 0 if(vsc.plc.PHORONGUARD_ONLY) if(head.flags & PHORONGUARD) return 1 - else if(head.flags & HEADCOVERSEYES) + else if(head.body_parts_covered & EYES) return 1 return 0 diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 1fa7063905..434e151dff 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -36,9 +36,6 @@ #define PROXMOVE 0x200 // Does this object require proximity checking in Enter()? //Use these flags to indicate if an item obscures the specified slots from view, whereas body_parts_covered seems to be used to indicate what body parts the item protects. -#define GLASSESCOVERSEYES 0x200 -#define MASKCOVERSEYES 0x200 // Get rid of some of the other retardation in these flags. -#define HEADCOVERSEYES 0x200 // Feel free to reallocate these numbers for other purposes. #define MASKCOVERSMOUTH 0x400 // On other items, these are just for mask/head. #define HEADCOVERSMOUTH 0x400 diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 1dfa1c37eb..acb864c93a 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -35,8 +35,7 @@ icon_state = "culthood" desc = "A hood worn by the followers of Nar-Sie." flags_inv = HIDEFACE - flags = HEADCOVERSEYES - body_parts_covered = HEAD|EYES + body_parts_covered = HEAD armor = list(melee = 30, bullet = 10, laser = 5,energy = 5, bomb = 0, bio = 0, rad = 0) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE @@ -50,7 +49,7 @@ icon_state = "magus" desc = "A helm worn by the followers of Nar-Sie." flags_inv = HIDEFACE - flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR + flags = HEADCOVERSMOUTH | BLOCKHAIR body_parts_covered = HEAD|FACE|EYES /obj/item/clothing/head/culthood/alt diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4c5a9dc39b..70b03a977c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -418,14 +418,12 @@ var/list/global/slot_flags_enumeration = list( /obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob) var/mob/living/carbon/human/H = M - if(istype(H) && ( \ - (H.head && H.head.flags & HEADCOVERSEYES) || \ - (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \ - (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \ - )) - // you can't stab someone in the eyes wearing a mask! - user << "You're going to need to remove the eye covering first." - return + if(istype(H)) + for(var/obj/item/protection in list(H.head, H.wear_mask, H.glasses)) + if(protection && (protection.body_parts_covered & EYES)) + // you can't stab someone in the eyes wearing a mask! + user << "You're going to need to remove the eye covering first." + return if(!M.has_eyes()) user << "You cannot locate any eyes on [M]!" diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 65e8a560df..eb16314866 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -51,7 +51,7 @@ var/mob/living/carbon/human/H = M //mob has protective eyewear if(istype(H)) for(var/obj/item/clothing/C in list(H.head,H.wear_mask,H.glasses)) - if(istype(C) && C.flags & (HEADCOVERSEYES|MASKCOVERSEYES|GLASSESCOVERSEYES)) + if(istype(C) && (C.body_parts_covered & EYES)) user << "You're going to need to remove [C.name] first." return diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm index c81a01786d..aca5196cfd 100644 --- a/code/game/objects/items/weapons/trays.dm +++ b/code/game/objects/items/weapons/trays.dm @@ -73,7 +73,14 @@ return - if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES))) + var/protected = 0 + for(var/slot in list(slot_head, slot_wear_mask, slot_glasses)) + var/obj/item/protection = M.get_equipped_item(slot) + if(istype(protection) && (protection.body_parts_covered & FACE)) + protected = 1 + break + + if(protected) M << "You get slammed in the face with the tray, against your mask!" if(prob(33)) src.add_blood(H) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index b811a16cd0..76ed924709 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -170,7 +170,7 @@ BLIND // can't see anything name = "glasses" icon = 'icons/obj/clothing/glasses.dmi' w_class = 2.0 - flags = GLASSESCOVERSEYES + body_parts_covered = EYES slot_flags = SLOT_EYES var/vision_flags = 0 var/darkness_view = 0//Base human is 2 diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 9ea9b6b7e2..c5fadf4463 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -3,7 +3,6 @@ name = "glasses" icon = 'icons/obj/clothing/glasses.dmi' //w_class = 2.0 - //flags = GLASSESCOVERSEYES //slot_flags = SLOT_EYES //var/vision_flags = 0 //var/darkness_view = 0//Base human is 2 @@ -13,7 +12,6 @@ var/active = 1 var/activation_sound = 'sound/items/goggles_charge.ogg' var/obj/screen/overlay = null - body_parts_covered = EYES /obj/item/clothing/glasses/attack_self(mob/user) if(toggleable) @@ -159,14 +157,12 @@ if(usr.canmove && !usr.stat && !usr.restrained()) if(src.up) src.up = !src.up - src.flags |= GLASSESCOVERSEYES flags_inv |= HIDEEYES body_parts_covered |= EYES icon_state = initial(icon_state) usr << "You flip \the [src] down to protect your eyes." else src.up = !src.up - src.flags &= ~HEADCOVERSEYES flags_inv &= ~HIDEEYES body_parts_covered &= ~EYES icon_state = "[initial(icon_state)]up" diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 2938ef4688..94e8cd2949 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -1,7 +1,7 @@ /obj/item/clothing/glasses/hud name = "HUD" desc = "A heads-up display that provides important info in (almost) real time." - flags = null //doesn't protect eyes because it's a monocle, duh + flags = 0 //doesn't protect eyes because it's a monocle, duh origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 2) var/list/icon/current = list() //the current hud icons diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 18a0e5fcbf..4fd49c8dcb 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -6,7 +6,8 @@ slot_l_hand_str = "helmet", slot_r_hand_str = "helmet", ) - flags = HEADCOVERSEYES | THICKMATERIAL + flags = THICKMATERIAL + body_parts_covered = HEAD armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0) flags_inv = HIDEEARS|HIDEEYES cold_protection = HEAD @@ -20,7 +21,7 @@ name = "riot helmet" desc = "It's a helmet specifically designed to protect against close range attacks." icon_state = "riot" - flags = HEADCOVERSEYES + body_parts_covered = HEAD|FACE|EYES //face shield armor = list(melee = 82, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0) flags_inv = HIDEEARS siemens_coefficient = 0.7 @@ -29,7 +30,6 @@ name = "\improper SWAT helmet" desc = "They're often used by highly trained Swat Members." icon_state = "swat" - flags = HEADCOVERSEYES armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) flags_inv = HIDEEARS|HIDEEYES cold_protection = HEAD @@ -40,7 +40,6 @@ name = "\improper Thunderdome helmet" desc = "'Let the battle commence!'" icon_state = "thunderdome" - flags = HEADCOVERSEYES armor = list(melee = 80, bullet = 60, laser = 50,energy = 10, bomb = 25, bio = 10, rad = 0) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE @@ -50,15 +49,15 @@ name = "gladiator helmet" desc = "Ave, Imperator, morituri te salutant." icon_state = "gladiator" - flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH|BLOCKHAIR flags_inv = HIDEMASK|HIDEEARS|HIDEEYES + body_parts_covered = HEAD|FACE siemens_coefficient = 1 /obj/item/clothing/head/helmet/tactical name = "tactical helmet" desc = "An armored helmet capable of being fitted with a multitude of attachments." icon_state = "swathelm" - flags = HEADCOVERSEYES sprite_sheets = list( "Tajara" = 'icons/mob/species/tajaran/helmet.dmi', "Unathi" = 'icons/mob/species/unathi/helmet.dmi', @@ -72,9 +71,9 @@ name = "Augment Array" desc = "A helmet with optical and cranial augments coupled to it." icon_state = "v62" - flags = HEADCOVERSEYES armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) flags_inv = HIDEEARS|HIDEEYES + body_parts_covered = HEAD|EYES cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0.5 diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 7543df6bb1..4793a772f3 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -38,15 +38,15 @@ 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 = HEADCOVERSEYES|BLOCKHAIR - body_parts_covered = HEAD|EYES + flags = BLOCKHAIR + body_parts_covered = HEAD //Chaplain /obj/item/clothing/head/nun_hood name = "nun hood" desc = "Maximum piety in this star system." icon_state = "nun_hood" - flags = HEADCOVERSEYES|BLOCKHAIR + flags = BLOCKHAIR body_parts_covered = HEAD //Mime diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 281a341f26..85c505b4f6 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 = HEADCOVERSEYES|BLOCKHAIR + flags = BLOCKHAIR body_parts_covered = HEAD|FACE|EYES /obj/item/clothing/head/nursehat @@ -84,7 +84,7 @@ 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 = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH|BLOCKHAIR flags_inv = 0 body_parts_covered = HEAD|FACE|EYES @@ -101,7 +101,7 @@ desc = "A helmet made out of a box." icon_state = "cardborg_h" item_state = "cardborg_h" - flags = HEADCOVERSEYES | HEADCOVERSMOUTH + flags = HEADCOVERSMOUTH flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE body_parts_covered = HEAD|FACE|EYES @@ -109,7 +109,8 @@ name = "justice hat" desc = "fight for what's righteous!" icon_state = "justicered" - flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH|BLOCKHAIR + body_parts_covered = HEAD|EYES /obj/item/clothing/head/justice/blue icon_state = "justiceblue" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 462f61aeb4..d3179eaa80 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -19,7 +19,7 @@ slot_l_hand_str = "welding", slot_r_hand_str = "welding", ) - flags = HEADCOVERSEYES | HEADCOVERSMOUTH + flags = HEADCOVERSMOUTH matter = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 1000) var/up = 0 armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) @@ -44,14 +44,16 @@ if(usr.canmove && !usr.stat && !usr.restrained()) if(src.up) src.up = !src.up - src.flags |= (HEADCOVERSEYES | HEADCOVERSMOUTH) + src.flags |= (HEADCOVERSMOUTH) flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) + body_parts_covered |= (EYES|FACE) icon_state = base_state usr << "You flip the [src] down to protect your eyes." else src.up = !src.up - src.flags &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH) + src.flags &= ~(HEADCOVERSMOUTH) flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) + body_parts_covered &= ~(EYES|FACE) icon_state = "[base_state]up" usr << "You push the [src] up out of your face." update_clothing_icon() //so our mob-overlays @@ -66,9 +68,8 @@ desc = "It's tasty looking!" icon_state = "cake0" item_state = "cake0" - flags = HEADCOVERSEYES var/onfire = 0 - body_parts_covered = HEAD|EYES + body_parts_covered = HEAD /obj/item/clothing/head/cakehat/process() if(!onfire) @@ -124,9 +125,9 @@ name = "carved pumpkin" desc = "A jack o' lantern! Believed to ward off evil spirits." icon_state = "hardhat0_pumpkin"//Could stand to be renamed - flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR + flags = HEADCOVERSMOUTH | BLOCKHAIR flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE - body_parts_covered = HEAD|EYES + body_parts_covered = HEAD|FACE|EYES brightness_on = 2 light_overlay = "helmet_light" w_class = 3 @@ -155,4 +156,4 @@ desc = "You can hear the distant sounds of rhythmic electronica." icon_state = "richard" body_parts_covered = HEAD|FACE - flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH|BLOCKHAIR diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 3ef2587998..6111668f91 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -2,7 +2,7 @@ name = "gas mask" desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air." icon_state = "gas_alt" - flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT + flags = MASKCOVERSMOUTH | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT flags_inv = HIDEEARS|HIDEEYES|HIDEFACE body_parts_covered = FACE|EYES w_class = 3.0 diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index 4742642554..0dc5f91aba 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -45,7 +45,7 @@ /obj/item/clothing/head/helmet/space/vox armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.6 - flags = HEADCOVERSEYES|STOPPRESSUREDAMAGE + flags = STOPPRESSUREDAMAGE species_restricted = list("Vox") sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi') diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 0e79b36d64..064bf04088 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -4,7 +4,7 @@ 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 = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE + flags = BLOCKHAIR | STOPPRESSUREDAMAGE flags_inv = HIDEFACE 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 27b8c12642..f5cee89e1e 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -37,7 +37,7 @@ 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 = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL + flags = BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL siemens_coefficient = 0.6 //how is this a space helmet? @@ -46,7 +46,7 @@ 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 = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE + flags = BLOCKHAIR | STOPPRESSUREDAMAGE siemens_coefficient = 0.9 //Space santa outfit suit @@ -55,7 +55,7 @@ desc = "Ho ho ho. Merrry X-mas!" icon_state = "santahat" item_state = "santahat" - flags = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE + flags = BLOCKHAIR | STOPPRESSUREDAMAGE body_parts_covered = HEAD /obj/item/clothing/suit/space/santa @@ -74,7 +74,7 @@ icon_state = "pirate" item_state = "pirate" armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - flags = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE + flags = BLOCKHAIR | STOPPRESSUREDAMAGE 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 e38fa950ff..db44c39a03 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -4,7 +4,7 @@ /obj/item/clothing/head/helmet/space/rig name = "helmet" - flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL + flags = BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL flags_inv = HIDEEARS|HIDEEYES|HIDEFACE body_parts_covered = HEAD|FACE|EYES heat_protection = HEAD|FACE|EYES diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 6d45662603..0a962bd3d7 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -6,7 +6,7 @@ name = "Space helmet" icon_state = "space" desc = "A special helmet designed for work in a hazardous, low-pressure environment." - flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT + flags = BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT 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 bbeb7335e3..df55990363 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -8,7 +8,7 @@ ) desc = "A hood that protects the head and face from biological comtaminants." permeability_coefficient = 0.01 - flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH|BLOCKHAIR armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES body_parts_covered = HEAD|FACE|EYES diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 37008da464..64c43bc960 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -47,7 +47,7 @@ name = "bomb hood" desc = "Use in case of bomb." icon_state = "bombsuit" - flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH|BLOCKHAIR armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES body_parts_covered = HEAD|FACE|EYES @@ -86,7 +86,7 @@ name = "Radiation Hood" icon_state = "rad" desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation" - flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSMOUTH|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 f3f399c886..4b10d1a3ef 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -328,17 +328,16 @@ This saves us from having to call add_fingerprint() any time something is put in switch(slot) if(slot_wear_mask) covering = src.head - check_flags = HEADCOVERSMOUTH + check_flags = FACE if(slot_glasses) covering = src.head - check_flags = HEADCOVERSEYES + check_flags = EYES if(slot_gloves, slot_w_uniform) covering = src.wear_suit - if(covering) - if((covering.body_parts_covered & I.body_parts_covered) || (covering.flags & check_flags)) - user << "\The [covering] is in the way." - return 0 + if(covering && (covering.body_parts_covered & (I.body_parts_covered|check_flags))) + user << "\The [covering] is in the way." + return 0 return 1 /mob/living/carbon/human/get_equipped_item(var/slot) diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm index 88ae8af640..b21f5b5d6c 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm @@ -15,7 +15,7 @@ var/const/MAX_ACTIVE_TIME = 400 icon_state = "facehugger" item_state = "facehugger" w_class = 3 //note: can be picked up by aliens unlike most other items of w_class below 4 - flags = MASKCOVERSMOUTH | MASKCOVERSEYES | AIRTIGHT | PROXMOVE + flags = MASKCOVERSMOUTH | AIRTIGHT | PROXMOVE body_parts_covered = FACE|EYES throw_range = 5 diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index acc95fbe40..f179920e3d 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -359,11 +359,11 @@ if(state < GRAB_NECK) assailant << "You require a better grab to do this." return - if((affecting:head && affecting:head.flags & HEADCOVERSEYES) || \ - (affecting:wear_mask && affecting:wear_mask.flags & MASKCOVERSEYES) || \ - (affecting:glasses && affecting:glasses.flags & GLASSESCOVERSEYES)) - assailant << "You're going to need to remove the eye covering first." - return + for(var/slot in list(slot_wear_mask, slot_head, slot_glasses)) + var/obj/item/protection = affecting.get_equipped_item(slot) + if(istype(protection) && (protection.body_parts_covered & EYES)) + assailant << "You're going to need to remove the eye covering first." + return if(!affecting.has_eyes()) assailant << "You cannot locate any eyes on [affecting]!" return diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index e355180df1..b6cd00bc3d 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -271,20 +271,20 @@ if(H.species && (H.species.flags & NO_PAIN)) return if(H.head) - if(H.head.flags & MASKCOVERSEYES) + if(H.head.body_parts_covered & EYES) eyes_covered = 1 safe_thing = H.head if(H.head.flags & MASKCOVERSMOUTH) mouth_covered = 1 safe_thing = H.head if(H.wear_mask) - if(!eyes_covered && H.wear_mask.flags & MASKCOVERSEYES) + if(!eyes_covered && H.wear_mask.body_parts_covered & EYES) eyes_covered = 1 safe_thing = H.wear_mask if(!mouth_covered && H.wear_mask.flags & MASKCOVERSMOUTH) mouth_covered = 1 safe_thing = H.wear_mask - if(H.glasses) + if(H.glasses && H.glasses.body_parts_covered & EYES) if(!eyes_covered) eyes_covered = 1 if(!safe_thing) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index bdb1754ca8..c352b60332 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -40,10 +40,10 @@ var/obj/item/safe_thing = null if(victim.wear_mask) - if (victim.wear_mask.flags & MASKCOVERSEYES) + if (victim.wear_mask.body_parts_covered & EYES) safe_thing = victim.wear_mask if(victim.head) - if (victim.head.flags & MASKCOVERSEYES) + if (victim.head.body_parts_covered & EYES) safe_thing = victim.head if(victim.glasses) if (!safe_thing)