diff --git a/code/__HELPERS/pronouns.dm b/code/__HELPERS/pronouns.dm
index 8b214982fdd..f7bffd53f81 100644
--- a/code/__HELPERS/pronouns.dm
+++ b/code/__HELPERS/pronouns.dm
@@ -201,65 +201,65 @@
//humans need special handling, because they can have their gender hidden
/mob/living/carbon/human/p_they(capitalized, temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_their(capitalized, temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_them(capitalized, temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_have(temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_are(temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_were(temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_do(temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_s(temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
/mob/living/carbon/human/p_es(temp_gender)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
- if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
+ if((obscured & ITEM_SLOT_ICLOTHING) && skipface)
temp_gender = PLURAL
return ..()
diff --git a/code/datums/components/bloodysoles.dm b/code/datums/components/bloodysoles.dm
index 1dd5669edec..3ef793899be 100644
--- a/code/datums/components/bloodysoles.dm
+++ b/code/datums/components/bloodysoles.dm
@@ -44,7 +44,7 @@
* Returns true if the parent item is obscured by something else that the wielder is wearing
*/
/datum/component/bloodysoles/proc/is_obscured()
- return equipped_slot in wielder.check_obscured_slots(TRUE)
+ return wielder.check_obscured_slots(TRUE) & equipped_slot
/**
* Run to update the icon of the parent
@@ -266,7 +266,7 @@
/datum/component/bloodysoles/feet/is_obscured()
if(wielder.shoes)
return TRUE
- return ITEM_SLOT_FEET in wielder.check_obscured_slots(TRUE)
+ return wielder.check_obscured_slots(TRUE) & ITEM_SLOT_FEET
/datum/component/bloodysoles/feet/on_moved(datum/source, OldLoc, Dir, Forced)
if(wielder.num_legs < 2)
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index aba2ae9b9b0..d60e428bcc9 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -357,7 +357,7 @@
/mob/living/carbon/proc/check_obscured_slots(transparent_protection)
- var/list/obscured = list()
+ var/obscured = NONE
var/hidden_slots = NONE
for(var/obj/item/I in get_equipped_items())
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 9d2a67c94fa..0823c844b0d 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -189,14 +189,14 @@
Head: [(head && !(head.item_flags & ABSTRACT)) ? head : "Nothing"]"}
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
- if(ITEM_SLOT_NECK in obscured)
+ if(obscured & ITEM_SLOT_NECK)
dat += "
Neck: Obscured"
else
dat += "
Neck: [(wear_neck && !(wear_neck.item_flags & ABSTRACT)) ? (wear_neck) : "Nothing"]"
- if(ITEM_SLOT_MASK in obscured)
+ if(obscured & ITEM_SLOT_MASK)
dat += "
Mask: Obscured"
else
dat += "
Mask: [(wear_mask && !(wear_mask.item_flags & ABSTRACT)) ? wear_mask : "Nothing"]"
@@ -1152,30 +1152,30 @@
. = TRUE
// Check and wash stuff that can be covered
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
// If the eyes are covered by anything but glasses, that thing will be covering any potential glasses as well.
if(glasses && is_eyes_covered(FALSE, TRUE, TRUE) && glasses.wash(clean_types))
update_inv_glasses()
. = TRUE
- if(wear_mask && !(ITEM_SLOT_MASK in obscured) && wear_mask.wash(clean_types))
+ if(wear_mask && !(obscured & ITEM_SLOT_MASK) && wear_mask.wash(clean_types))
update_inv_wear_mask()
. = TRUE
- if(ears && !(ITEM_SLOT_EARS in obscured) && ears.wash(clean_types))
+ if(ears && !(obscured & ITEM_SLOT_EARS) && ears.wash(clean_types))
update_inv_ears()
. = TRUE
- if(wear_neck && !(ITEM_SLOT_NECK in obscured) && wear_neck.wash(clean_types))
+ if(wear_neck && !(obscured & ITEM_SLOT_NECK) && wear_neck.wash(clean_types))
update_inv_neck()
. = TRUE
- if(shoes && !(ITEM_SLOT_FEET in obscured) && shoes.wash(clean_types))
+ if(shoes && !(obscured & ITEM_SLOT_FEET) && shoes.wash(clean_types))
update_inv_shoes()
. = TRUE
- if(gloves && !(ITEM_SLOT_GLOVES in obscured) && gloves.wash(clean_types))
+ if(gloves && !(obscured & ITEM_SLOT_GLOVES) && gloves.wash(clean_types))
update_inv_gloves()
. = TRUE
diff --git a/code/modules/mob/living/carbon/carbon_update_icons.dm b/code/modules/mob/living/carbon/carbon_update_icons.dm
index edc49d13106..5df3a23903f 100644
--- a/code/modules/mob/living/carbon/carbon_update_icons.dm
+++ b/code/modules/mob/living/carbon/carbon_update_icons.dm
@@ -115,7 +115,7 @@
inv.update_icon()
if(wear_mask)
- if(!(ITEM_SLOT_MASK in check_obscured_slots()))
+ if(!(check_obscured_slots() & ITEM_SLOT_MASK))
overlays_standing[FACEMASK_LAYER] = wear_mask.build_worn_icon(default_layer = FACEMASK_LAYER, default_icon_file = 'icons/mob/clothing/mask.dmi')
update_hud_wear_mask(wear_mask)
@@ -129,7 +129,7 @@
inv.update_icon()
if(wear_neck)
- if(!(ITEM_SLOT_NECK in check_obscured_slots()))
+ if(!(check_obscured_slots() & ITEM_SLOT_NECK))
overlays_standing[NECK_LAYER] = wear_neck.build_worn_icon(default_layer = NECK_LAYER, default_icon_file = 'icons/mob/clothing/neck.dmi')
update_hud_neck(wear_neck)
diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm
index 5d6074bd200..460a59ae862 100644
--- a/code/modules/mob/living/carbon/examine.dm
+++ b/code/modules/mob/living/carbon/examine.dm
@@ -7,15 +7,15 @@
var/t_is = p_are()
. = list("*---------*\nThis is [icon2html(src, user)] \a [src]!")
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
if (handcuffed)
. += "[t_He] [t_is] [icon2html(handcuffed, user)] handcuffed!"
if (head)
. += "[t_He] [t_is] wearing [head.get_examine_string(user)] on [t_his] head. "
- if(wear_mask && !(ITEM_SLOT_MASK in obscured))
+ if(wear_mask && !(obscured & ITEM_SLOT_MASK))
. += "[t_He] [t_is] wearing [wear_mask.get_examine_string(user)] on [t_his] face."
- if(wear_neck && !(ITEM_SLOT_NECK in obscured))
+ if(wear_neck && !(obscured & ITEM_SLOT_NECK))
. += "[t_He] [t_is] wearing [wear_neck.get_examine_string(user)] around [t_his] neck."
for(var/obj/item/I in held_items)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 5dd153472cd..3ce41ea56f2 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -15,11 +15,11 @@
. = list("*---------*\nThis is [!obscure_name ? name : "Unknown"]!")
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
//uniform
- if(w_uniform && !(ITEM_SLOT_ICLOTHING in obscured))
+ if(w_uniform && !(obscured & ITEM_SLOT_ICLOTHING))
//accessory
var/accessory_msg
if(istype(w_uniform, /obj/item/clothing/under))
@@ -35,7 +35,7 @@
if(wear_suit)
. += "[t_He] [t_is] wearing [wear_suit.get_examine_string(user)]."
//suit/armor storage
- if(s_store && !(ITEM_SLOT_SUITSTORE in obscured))
+ if(s_store && !(obscured & ITEM_SLOT_SUITSTORE))
. += "[t_He] [t_is] carrying [s_store.get_examine_string(user)] on [t_his] [wear_suit.name]."
//back
if(back)
@@ -48,7 +48,7 @@
var/datum/component/forensics/FR = GetComponent(/datum/component/forensics)
//gloves
- if(gloves && !(ITEM_SLOT_GLOVES in obscured))
+ if(gloves && !(obscured & ITEM_SLOT_GLOVES))
. += "[t_He] [t_has] [gloves.get_examine_string(user)] on [t_his] hands."
else if(FR && length(FR.blood_DNA))
if(num_hands)
@@ -68,25 +68,25 @@
. += "[t_He] [t_has] [belt.get_examine_string(user)] about [t_his] waist."
//shoes
- if(shoes && !(ITEM_SLOT_FEET in obscured))
+ if(shoes && !(obscured & ITEM_SLOT_FEET))
. += "[t_He] [t_is] wearing [shoes.get_examine_string(user)] on [t_his] feet."
//mask
- if(wear_mask && !(ITEM_SLOT_MASK in obscured))
+ if(wear_mask && !(obscured & ITEM_SLOT_MASK))
. += "[t_He] [t_has] [wear_mask.get_examine_string(user)] on [t_his] face."
- if(wear_neck && !(ITEM_SLOT_NECK in obscured))
+ if(wear_neck && !(obscured & ITEM_SLOT_NECK))
. += "[t_He] [t_is] wearing [wear_neck.get_examine_string(user)] around [t_his] neck."
//eyes
- if(!(ITEM_SLOT_EYES in obscured))
+ if(!(obscured & ITEM_SLOT_EYES))
if(glasses)
. += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes."
else if(eye_color == BLOODCULT_EYE && iscultist(src) && HAS_TRAIT(src, CULT_EYES))
. += "[t_His] eyes are glowing an unnatural red!"
//ears
- if(ears && !(ITEM_SLOT_EARS in obscured))
+ if(ears && !(obscured & ITEM_SLOT_EARS))
. += "[t_He] [t_has] [ears.get_examine_string(user)] on [t_his] ears."
//ID
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 2159a1847b8..32ddac430fd 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -107,7 +107,7 @@
/mob/living/carbon/human/show_inv(mob/user)
user.set_machine(src)
var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask)
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
var/list/dat = list()
dat += ""
@@ -124,22 +124,22 @@
dat += "| Head: | [(head && !(head.item_flags & ABSTRACT)) ? head : "Empty"] |
"
- if(ITEM_SLOT_MASK in obscured)
+ if(obscured & ITEM_SLOT_MASK)
dat += "| Mask: | Obscured |
"
else
dat += "| Mask: | [(wear_mask && !(wear_mask.item_flags & ABSTRACT)) ? wear_mask : "Empty"] |
"
- if(ITEM_SLOT_NECK in obscured)
+ if(obscured & ITEM_SLOT_NECK)
dat += "| Neck: | Obscured |
"
else
dat += "| Neck: | [(wear_neck && !(wear_neck.item_flags & ABSTRACT)) ? wear_neck : "Empty"] |
"
- if(ITEM_SLOT_EYES in obscured)
+ if(obscured & ITEM_SLOT_EYES)
dat += "| Eyes: | Obscured |
"
else
dat += "| Eyes: | [(glasses && !(glasses.item_flags & ABSTRACT)) ? glasses : "Empty"] |
"
- if(ITEM_SLOT_EARS in obscured)
+ if(obscured & ITEM_SLOT_EARS)
dat += "| Ears: | Obscured |
"
else
dat += "| Ears: | [(ears && !(ears.item_flags & ABSTRACT)) ? ears : "Empty"] |
"
@@ -148,7 +148,7 @@
dat += "| Exosuit: | [(wear_suit && !(wear_suit.item_flags & ABSTRACT)) ? wear_suit : "Empty"] |
"
if(wear_suit)
- if(ITEM_SLOT_SUITSTORE in obscured)
+ if(obscured & ITEM_SLOT_SUITSTORE)
dat += "| ↳Suit Storage: |
"
else
dat += "| ↳Suit Storage: | [(s_store && !(s_store.item_flags & ABSTRACT)) ? s_store : "Empty"]"
@@ -158,7 +158,7 @@
else
dat += " |
| ↳Suit Storage: |
"
- if(ITEM_SLOT_FEET in obscured)
+ if(obscured & ITEM_SLOT_FEET)
dat += "| Shoes: | Obscured |
"
else
dat += "| Shoes: | [(shoes && !(shoes.item_flags & ABSTRACT)) ? shoes : "Empty"]"
@@ -166,12 +166,12 @@
dat += " [shoes.tied ? "Untie shoes" : "Knot shoes"]"
dat += " |
"
- if(ITEM_SLOT_GLOVES in obscured)
+ if(obscured & ITEM_SLOT_GLOVES)
dat += "| Gloves: | Obscured |
"
else
dat += "| Gloves: | [(gloves && !(gloves.item_flags & ABSTRACT)) ? gloves : "Empty"] |
"
- if(ITEM_SLOT_ICLOTHING in obscured)
+ if(obscured & ITEM_SLOT_ICLOTHING)
dat += "| Uniform: | Obscured |
"
else
dat += "| Uniform: | [(w_uniform && !(w_uniform.item_flags & ABSTRACT)) ? w_uniform : "Empty"]"
@@ -182,7 +182,7 @@
dat += " |
"
var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_CHEST)
- if((w_uniform == null && !(dna && dna.species.nojumpsuit) && !(O && O.status == BODYPART_ROBOTIC)) || (ITEM_SLOT_ICLOTHING in obscured))
+ if((w_uniform == null && !(dna && dna.species.nojumpsuit) && !(O && O.status == BODYPART_ROBOTIC)) || (obscured & ITEM_SLOT_ICLOTHING))
dat += "| ↳Pockets: |
"
dat += "| ↳ID: |
"
dat += "| ↳Belt: |
"
@@ -231,7 +231,7 @@
if(href_list["item"]) //canUseTopic check for this is handled by mob/Topic()
var/slot = text2num(href_list["item"])
- if(slot in check_obscured_slots(TRUE))
+ if(check_obscured_slots(TRUE) & slot)
to_chat(usr, "You can't reach that! Something is covering it.")
return
@@ -727,8 +727,8 @@
* Returns false if we couldn't wash our hands due to them being obscured, otherwise true
*/
/mob/living/carbon/human/proc/wash_hands(clean_types)
- var/list/obscured = check_obscured_slots()
- if(ITEM_SLOT_GLOVES in obscured)
+ var/obscured = check_obscured_slots()
+ if(obscured & ITEM_SLOT_GLOVES)
return FALSE
if(gloves)
@@ -762,8 +762,8 @@
update_inv_glasses()
. = TRUE
- var/list/obscured = check_obscured_slots()
- if(wear_mask && !(ITEM_SLOT_MASK in obscured) && wear_mask.wash(clean_types))
+ var/obscured = check_obscured_slots()
+ if(wear_mask && !(obscured & ITEM_SLOT_MASK) && wear_mask.wash(clean_types))
update_inv_wear_mask()
. = TRUE
@@ -783,9 +783,9 @@
. = TRUE
// Check and wash stuff that can be covered
- var/list/obscured = check_obscured_slots()
+ var/obscured = check_obscured_slots()
- if(w_uniform && !(ITEM_SLOT_ICLOTHING in obscured) && w_uniform.wash(clean_types))
+ if(w_uniform && !(obscured & ITEM_SLOT_ICLOTHING) && w_uniform.wash(clean_types))
update_inv_w_uniform()
. = TRUE
@@ -793,7 +793,7 @@
. = TRUE
// Wash hands if exposed
- if(!gloves && (clean_types & CLEAN_TYPE_BLOOD) && blood_in_hands > 0 && !(ITEM_SLOT_GLOVES in obscured))
+ if(!gloves && (clean_types & CLEAN_TYPE_BLOOD) && blood_in_hands > 0 && !(obscured & ITEM_SLOT_GLOVES))
blood_in_hands = 0
update_inv_gloves()
. = TRUE
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 9abdbf353eb..cdd80117e92 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1749,29 +1749,29 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(H.on_fire)
//the fire tries to damage the exposed clothes and items
var/list/burning_items = list()
- var/list/obscured = H.check_obscured_slots(TRUE)
+ var/obscured = H.check_obscured_slots(TRUE)
//HEAD//
- if(H.glasses && !(ITEM_SLOT_EYES in obscured))
+ if(H.glasses && !(obscured & ITEM_SLOT_EYES))
burning_items += H.glasses
- if(H.wear_mask && !(ITEM_SLOT_MASK in obscured))
+ if(H.wear_mask && !(obscured & ITEM_SLOT_MASK))
burning_items += H.wear_mask
- if(H.wear_neck && !(ITEM_SLOT_NECK in obscured))
+ if(H.wear_neck && !(obscured & ITEM_SLOT_NECK))
burning_items += H.wear_neck
- if(H.ears && !(ITEM_SLOT_EARS in obscured))
+ if(H.ears && !(obscured & ITEM_SLOT_EARS))
burning_items += H.ears
if(H.head)
burning_items += H.head
//CHEST//
- if(H.w_uniform && !(ITEM_SLOT_ICLOTHING in obscured))
+ if(H.w_uniform && !(obscured & ITEM_SLOT_ICLOTHING))
burning_items += H.w_uniform
if(H.wear_suit)
burning_items += H.wear_suit
//ARMS & HANDS//
var/obj/item/clothing/arm_clothes = null
- if(H.gloves && !(ITEM_SLOT_GLOVES in obscured))
+ if(H.gloves && !(obscured & ITEM_SLOT_GLOVES))
arm_clothes = H.gloves
else if(H.wear_suit && ((H.wear_suit.body_parts_covered & HANDS) || (H.wear_suit.body_parts_covered & ARMS)))
arm_clothes = H.wear_suit
@@ -1782,7 +1782,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
//LEGS & FEET//
var/obj/item/clothing/leg_clothes = null
- if(H.shoes && !(ITEM_SLOT_FEET in obscured))
+ if(H.shoes && !(obscured & ITEM_SLOT_FEET))
leg_clothes = H.shoes
else if(H.wear_suit && ((H.wear_suit.body_parts_covered & FEET) || (H.wear_suit.body_parts_covered & LEGS)))
leg_clothes = H.wear_suit
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index a52fa0bb75a..6f11b5872e4 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -140,10 +140,10 @@
//the fire tries to damage the exposed clothes and items
var/list/burning_items = list()
//HEAD//
- var/list/obscured = check_obscured_slots(TRUE)
- if(wear_mask && !(ITEM_SLOT_MASK in obscured))
+ var/obscured = check_obscured_slots(TRUE)
+ if(wear_mask && !(obscured & ITEM_SLOT_MASK))
burning_items += wear_mask
- if(wear_neck && !(ITEM_SLOT_NECK in obscured))
+ if(wear_neck && !(obscured & ITEM_SLOT_NECK))
burning_items += wear_neck
if(head)
burning_items += head