diff --git a/code/__DEFINES/dcs/signals/signals_object.dm b/code/__DEFINES/dcs/signals/signals_object.dm index 6c7e26f6641..50c1d54861b 100644 --- a/code/__DEFINES/dcs/signals/signals_object.dm +++ b/code/__DEFINES/dcs/signals/signals_object.dm @@ -100,7 +100,7 @@ // /obj/item signals -///from base of obj/item/equipped(): (/mob/equipper, slot) +///from base of obj/item/equipped(): (mob/equipper, slot) #define COMSIG_ITEM_EQUIPPED "item_equip" /// A mob has just equipped an item. Called on [/mob] from base of [/obj/item/equipped()]: (/obj/item/equipped_item, slot) #define COMSIG_MOB_EQUIPPED_ITEM "mob_equipped_item" diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 004d5331d6c..ebd38e63eac 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -127,7 +127,7 @@ //stops TK grabs being equipped anywhere but into hands /obj/item/tk_grab/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_HANDS) + if(slot & ITEM_SLOT_HANDS) return qdel(src) diff --git a/code/datums/ai/cursed/cursed_controller.dm b/code/datums/ai/cursed/cursed_controller.dm index 11501a3f9fb..468273fa5c8 100644 --- a/code/datums/ai/cursed/cursed_controller.dm +++ b/code/datums/ai/cursed/cursed_controller.dm @@ -50,10 +50,10 @@ /datum/ai_controller/cursed/proc/try_equipping_to_target_slot(mob/living/carbon/curse_victim, slot_already_in) var/obj/item/item_pawn = pawn var/attempted_slot = blackboard[BB_TARGET_SLOT] - if(slot_already_in && attempted_slot == slot_already_in) //thanks for making it easy + if(slot_already_in && (attempted_slot & slot_already_in)) //thanks for making it easy what_a_horrible_night_to_have_a_curse() return - if(attempted_slot == ITEM_SLOT_HANDS) //hands needs some different checks + if(attempted_slot & ITEM_SLOT_HANDS) //hands needs some different checks curse_victim.drop_all_held_items() if(curse_victim.put_in_hands(item_pawn, del_on_fail = FALSE)) to_chat(curse_victim, span_danger("[item_pawn] leaps into your hands!")) diff --git a/code/datums/components/shielded.dm b/code/datums/components/shielded.dm index d314899171c..8ac76047a8b 100644 --- a/code/datums/components/shielded.dm +++ b/code/datums/components/shielded.dm @@ -107,7 +107,7 @@ /datum/component/shielded/proc/on_equipped(datum/source, mob/user, slot) SIGNAL_HANDLER - if(slot == ITEM_SLOT_HANDS && !shield_inhand) + if((slot & ITEM_SLOT_HANDS) && !shield_inhand) lost_wearer(source, user) return set_wearer(source, user) diff --git a/code/datums/components/spill.dm b/code/datums/components/spill.dm index 0349d155331..e04b24c31ef 100644 --- a/code/datums/components/spill.dm +++ b/code/datums/components/spill.dm @@ -45,7 +45,7 @@ /datum/component/spill/proc/equip_react(obj/item/source, mob/equipper, slot) SIGNAL_HANDLER - if(slot == ITEM_SLOT_LPOCKET || slot == ITEM_SLOT_RPOCKET) + if(slot & (ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET)) RegisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN, .proc/knockdown_react, TRUE) else UnregisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN) diff --git a/code/datums/components/tactical.dm b/code/datums/components/tactical.dm index 47677755acb..3b285cb05d1 100644 --- a/code/datums/components/tactical.dm +++ b/code/datums/components/tactical.dm @@ -22,7 +22,7 @@ /datum/component/tactical/proc/modify(obj/item/source, mob/user, slot) SIGNAL_HANDLER - if(allowed_slot && slot != allowed_slot) + if(allowed_slot && !(slot & allowed_slot)) unmodify() return diff --git a/code/datums/components/twohanded.dm b/code/datums/components/twohanded.dm index d57feff2984..54a6a18e06d 100644 --- a/code/datums/components/twohanded.dm +++ b/code/datums/components/twohanded.dm @@ -107,7 +107,7 @@ /datum/component/two_handed/proc/on_equip(datum/source, mob/user, slot) SIGNAL_HANDLER - if(require_twohands && slot == ITEM_SLOT_HANDS) // force equip the item + if(require_twohands && (slot & ITEM_SLOT_HANDS)) // force equip the item wield(user) if(!user.is_holding(parent) && wielded && !require_twohands) unwield(user) diff --git a/code/datums/elements/earhealing.dm b/code/datums/elements/earhealing.dm index 9ec7cdff06e..fee367348d4 100644 --- a/code/datums/elements/earhealing.dm +++ b/code/datums/elements/earhealing.dm @@ -17,7 +17,7 @@ /datum/element/earhealing/proc/on_equip(datum/source, mob/living/carbon/user, slot) SIGNAL_HANDLER - if(slot == ITEM_SLOT_EARS && istype(user)) + if((slot & ITEM_SLOT_EARS) && istype(user)) START_PROCESSING(SSdcs, src) user_by_item[source] = user else diff --git a/code/datums/martial/boxing.dm b/code/datums/martial/boxing.dm index c1723551313..fd85943f4db 100644 --- a/code/datums/martial/boxing.dm +++ b/code/datums/martial/boxing.dm @@ -69,7 +69,7 @@ // boxing requires human if(!ishuman(user)) return - if(slot == ITEM_SLOT_GLOVES) + if(slot & ITEM_SLOT_GLOVES) var/mob/living/student = user style.teach(student, 1) diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm index a801d56daa7..b35e0fd3798 100644 --- a/code/datums/martial/krav_maga.dm +++ b/code/datums/martial/krav_maga.dm @@ -170,7 +170,7 @@ /obj/item/clothing/gloves/krav_maga/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_GLOVES) + if(slot & ITEM_SLOT_GLOVES) style.teach(user, TRUE) /obj/item/clothing/gloves/krav_maga/dropped(mob/user) diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm index 20b3f22e76f..ccebdb64ef1 100644 --- a/code/datums/martial/wrestling.dm +++ b/code/datums/martial/wrestling.dm @@ -468,7 +468,7 @@ If you make a derivative work from this code, you must include this notification /obj/item/storage/belt/champion/wrestling/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_BELT) + if(slot & ITEM_SLOT_BELT) style.teach(user, TRUE) return diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm index c9bd5a0aceb..f07893bdc38 100644 --- a/code/datums/quirks/negative.dm +++ b/code/datums/quirks/negative.dm @@ -33,7 +33,7 @@ /datum/quirk/badback/proc/on_equipped_item(mob/living/source, obj/item/equipped_item, slot) SIGNAL_HANDLER - if((slot != ITEM_SLOT_BACK) || !istype(equipped_item, /obj/item/storage/backpack)) + if(!(slot & ITEM_SLOT_BACK) || !istype(equipped_item, /obj/item/storage/backpack)) return quirk_holder.add_mood_event("back_pain", /datum/mood_event/back_pain) diff --git a/code/datums/storage/storage.dm b/code/datums/storage/storage.dm index 00974bdc23a..407be45a226 100644 --- a/code/datums/storage/storage.dm +++ b/code/datums/storage/storage.dm @@ -268,7 +268,7 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) return "\n\t[span_notice("[desc.Join("\n\t")]")]" /// Updates the action button for toggling collectmode. -/datum/storage/proc/update_actions() +/datum/storage/proc/update_actions(atom/source, mob/equipper, slot) SIGNAL_HANDLER var/obj/item/resolve_parent = parent?.resolve() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 51e5dcbef13..be7f3619346 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -709,7 +709,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons if(!initial) if(equip_sound && (slot_flags & slot)) playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE) - else if(slot == ITEM_SLOT_HANDS) + else if(slot & ITEM_SLOT_HANDS) playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, ignore_walls = FALSE) user.update_equipment_speed_mods() @@ -727,7 +727,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons /// Sometimes we only want to grant the item's action if it's equipped in a specific slot. /obj/item/proc/item_action_slot_check(slot, mob/user) - if(slot == ITEM_SLOT_BACKPACK || slot == ITEM_SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there + if(slot & (ITEM_SLOT_BACKPACK|ITEM_SLOT_LEGCUFFED)) //these aren't true slots, so avoid granting actions there return FALSE return TRUE diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index fd64b728270..66cb460458e 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -1185,7 +1185,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window()) /obj/item/construction/plumbing/equipped(mob/user, slot, initial) . = ..() - if(slot == ITEM_SLOT_HANDS) + if(slot & ITEM_SLOT_HANDS) RegisterSignal(user, COMSIG_MOUSE_SCROLL_ON, .proc/mouse_wheeled) else UnregisterSignal(user, COMSIG_MOUSE_SCROLL_ON) diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index f376c9d6358..cb926c5d9f5 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -252,7 +252,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list( /obj/item/pipe_dispenser/equipped(mob/user, slot, initial) . = ..() - if(slot == ITEM_SLOT_HANDS) + if(slot & ITEM_SLOT_HANDS) RegisterSignal(user, COMSIG_MOUSE_SCROLL_ON, .proc/mouse_wheeled) else UnregisterSignal(user,COMSIG_MOUSE_SCROLL_ON) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 0ffb32c3232..4b4a24b7154 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -928,7 +928,7 @@ balloon_alert(user, "recolored") update_icon() -/obj/item/card/id/advanced/proc/update_intern_status(datum/source, mob/user) +/obj/item/card/id/advanced/proc/update_intern_status(datum/source, mob/user, slot) SIGNAL_HANDLER if(!user?.client) diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 91fa6f2047b..cf8728f9c89 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -1020,7 +1020,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/equipped(mob/user, slot) . = ..() - if(slot != ITEM_SLOT_MASK) + if(!(slot & ITEM_SLOT_MASK)) return if(screw) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 671ec013e8e..5516bb0da8d 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -107,13 +107,13 @@ //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/defibrillator/attack_hand(mob/user, list/modifiers) if(loc == user) - if(slot_flags == ITEM_SLOT_BACK) + if(slot_flags & ITEM_SLOT_BACK) if(user.get_item_by_slot(ITEM_SLOT_BACK) == src) ui_action_click() else to_chat(user, span_warning("Put the defibrillator on your back first!")) - else if(slot_flags == ITEM_SLOT_BELT) + else if(slot_flags & ITEM_SLOT_BELT) if(user.get_item_by_slot(ITEM_SLOT_BELT) == src) ui_action_click() else @@ -210,13 +210,13 @@ /obj/item/defibrillator/equipped(mob/user, slot) ..() - if((slot_flags == ITEM_SLOT_BACK && slot != ITEM_SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != ITEM_SLOT_BELT)) + if(!(slot_flags & slot)) remove_paddles(user) update_power() /obj/item/defibrillator/item_action_slot_check(slot, mob/user) - if(slot == user.getBackSlot()) - return 1 + if(slot_flags & slot) + return TRUE /obj/item/defibrillator/proc/remove_paddles(mob/user) //this fox the bug with the paddles when other player stole you the defib when you have the paddles equiped if(ismob(paddles.loc)) @@ -279,7 +279,7 @@ emagged_state = "defibcompact-emagged" /obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user) - if(slot == user.getBeltSlot()) + if(slot & user.getBeltSlot()) return TRUE /obj/item/defibrillator/compact/loaded/Initialize(mapload) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index a2a9646bb38..aa33e49ec71 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -25,7 +25,7 @@ /obj/item/megaphone/equipped(mob/M, slot) . = ..() - if (slot == ITEM_SLOT_HANDS && !HAS_TRAIT(M, TRAIT_SIGN_LANG)) + if ((slot & ITEM_SLOT_HANDS) && !HAS_TRAIT(M, TRAIT_SIGN_LANG)) RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech) else UnregisterSignal(M, COMSIG_MOB_SAY) diff --git a/code/game/objects/items/devices/spyglasses.dm b/code/game/objects/items/devices/spyglasses.dm index 58c9a286783..b398dcc7b49 100644 --- a/code/game/objects/items/devices/spyglasses.dm +++ b/code/game/objects/items/devices/spyglasses.dm @@ -21,7 +21,7 @@ /obj/item/clothing/glasses/sunglasses/spy/equipped(mob/user, slot) . = ..() - if(slot != ITEM_SLOT_EYES) + if(!(slot & ITEM_SLOT_EYES)) user.client?.close_popup("spypopup") /obj/item/clothing/glasses/sunglasses/spy/dropped(mob/user) @@ -32,7 +32,7 @@ show_to_user(user) /obj/item/clothing/glasses/sunglasses/spy/item_action_slot_check(slot) - if(slot == ITEM_SLOT_EYES) + if(slot & ITEM_SLOT_EYES) return TRUE /obj/item/clothing/glasses/sunglasses/spy/Destroy() diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index e1f1f9c0764..851fa59f188 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -231,7 +231,7 @@ effective or pretty fucking useless. return /obj/item/shadowcloak/item_action_slot_check(slot, mob/user) - if(slot == ITEM_SLOT_BELT) + if(slot & ITEM_SLOT_BELT) return 1 /obj/item/shadowcloak/proc/Activate(mob/living/carbon/human/user) diff --git a/code/game/objects/items/food/bread.dm b/code/game/objects/items/food/bread.dm index 487a3c2ff84..b1449ae95d5 100644 --- a/code/game/objects/items/food/bread.dm +++ b/code/game/objects/items/food/bread.dm @@ -320,7 +320,7 @@ /obj/item/food/baguette/proc/on_sword_equipped(datum/source, mob/equipper, slot) SIGNAL_HANDLER - if(slot != ITEM_SLOT_HANDS) + if(!(slot & ITEM_SLOT_HANDS)) end_swordplay() /obj/item/food/garlicbread diff --git a/code/game/objects/items/scrolls.dm b/code/game/objects/items/scrolls.dm index 46b1955b1d0..9f615569f64 100644 --- a/code/game/objects/items/scrolls.dm +++ b/code/game/objects/items/scrolls.dm @@ -23,7 +23,7 @@ teleport.button_icon_state = icon_state /obj/item/teleportation_scroll/item_action_slot_check(slot, mob/user) - return (slot == ITEM_SLOT_HANDS) + return (slot & ITEM_SLOT_HANDS) /obj/item/teleportation_scroll/apprentice name = "lesser scroll of teleportation" diff --git a/code/game/objects/items/storage/holsters.dm b/code/game/objects/items/storage/holsters.dm index abcf0d4b10d..84eb1978fea 100644 --- a/code/game/objects/items/storage/holsters.dm +++ b/code/game/objects/items/storage/holsters.dm @@ -10,7 +10,7 @@ /obj/item/storage/belt/holster/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_BELT || ITEM_SLOT_SUITSTORE) + if(slot & (ITEM_SLOT_BELT|ITEM_SLOT_SUITSTORE)) ADD_TRAIT(user, TRAIT_GUNFLIP, CLOTHING_TRAIT) /obj/item/storage/belt/holster/dropped(mob/user) diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index b63034fac1d..71568930df1 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -33,7 +33,7 @@ toggle_mister(user) /obj/item/watertank/item_action_slot_check(slot, mob/user) - if(slot == user.getBackSlot()) + if(slot & user.getBackSlot()) return 1 /obj/item/watertank/proc/toggle_mister(mob/living/user) @@ -73,7 +73,7 @@ /obj/item/watertank/equipped(mob/user, slot) ..() - if(slot != ITEM_SLOT_BACK) + if(!(slot & ITEM_SLOT_BACK)) remove_noz() /obj/item/watertank/proc/remove_noz() @@ -406,7 +406,7 @@ toggle_injection() /obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user) - if(slot == ITEM_SLOT_BACK) + if(slot & ITEM_SLOT_BACK) return 1 /obj/item/reagent_containers/chemtank/proc/toggle_injection() diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index cbd6ba45fff..9b36d853afb 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -59,7 +59,7 @@ update_action_buttons() /obj/item/clothing/suit/armor/abductor/vest/item_action_slot_check(slot, mob/user) - if(slot == ITEM_SLOT_OCLOTHING) //we only give the mob the ability to activate the vest if he's actually wearing it. + if(slot & ITEM_SLOT_OCLOTHING) //we only give the mob the ability to activate the vest if he's actually wearing it. return TRUE /obj/item/clothing/suit/armor/abductor/vest/proc/SetDisguise(datum/icon_snapshot/entry) diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index 7fecd3d2efe..f7d2f972dab 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -350,7 +350,7 @@ Striking a noncultist, however, will tear their flesh."} /obj/item/clothing/glasses/hud/health/night/cultblind/equipped(mob/living/user, slot) ..() - if(user.stat != DEAD && !IS_CULTIST(user) && slot == ITEM_SLOT_EYES) + if(user.stat != DEAD && !IS_CULTIST(user) && (slot & ITEM_SLOT_EYES)) to_chat(user, span_cultlarge("\"You want to be blind, do you?\"")) user.dropItemToGround(src, TRUE) user.set_dizzy_if_lower(1 MINUTES) diff --git a/code/modules/antagonists/heretic/items/heretic_necks.dm b/code/modules/antagonists/heretic/items/heretic_necks.dm index 8b2cece62f2..e72d2e8172f 100644 --- a/code/modules/antagonists/heretic/items/heretic_necks.dm +++ b/code/modules/antagonists/heretic/items/heretic_necks.dm @@ -25,7 +25,7 @@ /obj/item/clothing/neck/eldritch_amulet/equipped(mob/user, slot) . = ..() - if(slot != ITEM_SLOT_NECK) + if(!(slot & ITEM_SLOT_NECK)) return if(!ishuman(user) || !IS_HERETIC_OR_MONSTER(user)) return diff --git a/code/modules/antagonists/heretic/items/madness_mask.dm b/code/modules/antagonists/heretic/items/madness_mask.dm index 0208c3f4c30..e620a95c01d 100644 --- a/code/modules/antagonists/heretic/items/madness_mask.dm +++ b/code/modules/antagonists/heretic/items/madness_mask.dm @@ -25,7 +25,7 @@ /obj/item/clothing/mask/madness_mask/equipped(mob/user, slot) . = ..() - if(slot != ITEM_SLOT_MASK) + if(!(slot & ITEM_SLOT_MASK)) return if(!ishuman(user) || !user.mind) return diff --git a/code/modules/antagonists/traitor/objectives/assassination.dm b/code/modules/antagonists/traitor/objectives/assassination.dm index 419932da713..fa7d0a4d021 100644 --- a/code/modules/antagonists/traitor/objectives/assassination.dm +++ b/code/modules/antagonists/traitor/objectives/assassination.dm @@ -99,7 +99,7 @@ return //your target please if(equipper.stat != DEAD) return //kill them please - if(slot != ITEM_SLOT_LPOCKET && slot != ITEM_SLOT_RPOCKET) + if(!(slot & (ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET))) return //in their pockets please succeed_objective() diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 854365bd2a1..a1bf0a3db68 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -153,7 +153,7 @@ clothing_traits = list(TRAIT_REAGENT_SCANNER, TRAIT_RESEARCH_SCANNER) /obj/item/clothing/glasses/science/item_action_slot_check(slot) - if(slot == ITEM_SLOT_EYES) + if(slot & ITEM_SLOT_EYES) return 1 /obj/item/clothing/glasses/science/suicide_act(mob/living/carbon/user) @@ -386,7 +386,7 @@ /obj/item/clothing/glasses/blindfold/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot == ITEM_SLOT_EYES) + if(slot & ITEM_SLOT_EYES) user.become_blind(BLINDFOLD_TRAIT) /obj/item/clothing/glasses/blindfold/dropped(mob/living/carbon/human/user) @@ -407,7 +407,7 @@ var/colored_before = FALSE /obj/item/clothing/glasses/blindfold/white/visual_equipped(mob/living/carbon/human/user, slot) - if(ishuman(user) && slot == ITEM_SLOT_EYES) + if(ishuman(user) && (slot & ITEM_SLOT_EYES)) update_icon(ALL, user) user.update_worn_glasses() //Color might have been changed by update_icon. ..() @@ -457,7 +457,7 @@ /obj/item/clothing/glasses/thermal/xray/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot != ITEM_SLOT_EYES || !istype(user)) + if(!(slot & ITEM_SLOT_EYES) || !istype(user)) return ADD_TRAIT(user, TRAIT_XRAY_VISION, GLASSES_TRAIT) @@ -563,7 +563,7 @@ /obj/item/clothing/glasses/debug/equipped(mob/user, slot) . = ..() - if(slot != ITEM_SLOT_EYES) + if(!(slot & ITEM_SLOT_EYES)) return if(ishuman(user)) for(var/hud in hudlist) @@ -613,7 +613,7 @@ /obj/item/clothing/glasses/salesman/equipped(mob/living/carbon/human/user, slot) ..() - if(slot != ITEM_SLOT_EYES) + if(!(slot & ITEM_SLOT_EYES)) return bigshot = user RegisterSignal(bigshot, COMSIG_CARBON_SANITY_UPDATE, .proc/moodshift) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index c6c9bbcb091..2f6d7c693d9 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -8,7 +8,7 @@ /obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot) ..() - if(slot != ITEM_SLOT_EYES) + if(!(slot & ITEM_SLOT_EYES)) return if(hud_type) var/datum/atom_hud/our_hud = GLOB.huds[hud_type] diff --git a/code/modules/clothing/gloves/special.dm b/code/modules/clothing/gloves/special.dm index bd09fc4451a..926d339ff15 100644 --- a/code/modules/clothing/gloves/special.dm +++ b/code/modules/clothing/gloves/special.dm @@ -19,7 +19,7 @@ /obj/item/clothing/gloves/cargo_gauntlet/proc/on_glove_equip(datum/source, mob/equipper, slot) SIGNAL_HANDLER - if(slot != ITEM_SLOT_GLOVES) + if(!(slot & ITEM_SLOT_GLOVES)) return var/datum/component/strong_pull/pull_component = pull_component_weakref?.resolve() diff --git a/code/modules/clothing/gloves/tacklers.dm b/code/modules/clothing/gloves/tacklers.dm index 1bee58dc659..16af9af1404 100644 --- a/code/modules/clothing/gloves/tacklers.dm +++ b/code/modules/clothing/gloves/tacklers.dm @@ -31,7 +31,7 @@ . = ..() if(!ishuman(user)) return - if(slot == ITEM_SLOT_GLOVES) + if(slot & ITEM_SLOT_GLOVES) var/mob/living/carbon/human/H = user tackler = H.AddComponent(/datum/component/tackler, stamina_cost=tackle_stam_cost, base_knockdown = base_knockdown, range = tackle_range, speed = tackle_speed, skill_mod = skill_mod, min_distance = min_distance) diff --git a/code/modules/clothing/head/animalears.dm b/code/modules/clothing/head/animalears.dm index 4c60167ff7d..7218b818fe5 100644 --- a/code/modules/clothing/head/animalears.dm +++ b/code/modules/clothing/head/animalears.dm @@ -7,7 +7,7 @@ dog_fashion = /datum/dog_fashion/head/kitty /obj/item/clothing/head/kitty/visual_equipped(mob/living/carbon/human/user, slot) - if(ishuman(user) && slot == ITEM_SLOT_HEAD) + if(ishuman(user) && (slot & ITEM_SLOT_HEAD)) update_icon(ALL, user) user.update_worn_head() //Color might have been changed by update_appearance. ..() diff --git a/code/modules/clothing/head/costume.dm b/code/modules/clothing/head/costume.dm index d94c29a3d41..be7d643dd46 100644 --- a/code/modules/clothing/head/costume.dm +++ b/code/modules/clothing/head/costume.dm @@ -109,7 +109,7 @@ /obj/item/clothing/head/cardborg/equipped(mob/living/user, slot) ..() - if(ishuman(user) && slot == ITEM_SLOT_HEAD) + if(ishuman(user) && (slot & ITEM_SLOT_HEAD)) var/mob/living/carbon/human/H = user if(istype(H.wear_suit, /obj/item/clothing/suit/costume/cardborg)) var/obj/item/clothing/suit/costume/cardborg/CB = H.wear_suit diff --git a/code/modules/clothing/head/frenchberet.dm b/code/modules/clothing/head/frenchberet.dm index f2d14b195ba..cda942edd0f 100644 --- a/code/modules/clothing/head/frenchberet.dm +++ b/code/modules/clothing/head/frenchberet.dm @@ -9,7 +9,7 @@ /obj/item/clothing/head/frenchberet/equipped(mob/M, slot) . = ..() - if (slot == ITEM_SLOT_HEAD) + if (slot & ITEM_SLOT_HEAD) RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech) ADD_TRAIT(M, TRAIT_GARLIC_BREATH, type) else diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 8100ea0a1ae..303b4df4638 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -223,7 +223,7 @@ /obj/item/clothing/head/warden/drill/equipped(mob/M, slot) . = ..() - if (slot == ITEM_SLOT_HEAD) + if (slot & ITEM_SLOT_HEAD) RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech) else UnregisterSignal(M, COMSIG_MOB_SAY) diff --git a/code/modules/clothing/head/mind_monkey_helmet.dm b/code/modules/clothing/head/mind_monkey_helmet.dm index 33322777c0a..5f7cc97c85a 100644 --- a/code/modules/clothing/head/mind_monkey_helmet.dm +++ b/code/modules/clothing/head/mind_monkey_helmet.dm @@ -32,7 +32,7 @@ /obj/item/clothing/head/helmet/monkey_sentience/equipped(mob/user, slot) . = ..() - if(slot != ITEM_SLOT_HEAD) + if(!(slot & ITEM_SLOT_HEAD)) return if(!ismonkey(user) || user.ckey) var/mob/living/something = user diff --git a/code/modules/clothing/head/pirate.dm b/code/modules/clothing/head/pirate.dm index 0ddaa4bd639..dece685062c 100644 --- a/code/modules/clothing/head/pirate.dm +++ b/code/modules/clothing/head/pirate.dm @@ -12,7 +12,7 @@ . = ..() if(!ishuman(user)) return - if(slot == ITEM_SLOT_HEAD) + if(slot & ITEM_SLOT_HEAD) user.grant_language(/datum/language/piratespeak/, TRUE, TRUE, LANGUAGE_HAT) to_chat(user, span_boldnotice("You suddenly know how to speak like a pirate!")) diff --git a/code/modules/clothing/head/tinfoilhat.dm b/code/modules/clothing/head/tinfoilhat.dm index a970107b8fa..9520731f455 100644 --- a/code/modules/clothing/head/tinfoilhat.dm +++ b/code/modules/clothing/head/tinfoilhat.dm @@ -24,7 +24,7 @@ /obj/item/clothing/head/foilhat/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot != ITEM_SLOT_HEAD || warped) + if(!(slot & ITEM_SLOT_HEAD) || warped) return if(paranoia) QDEL_NULL(paranoia) diff --git a/code/modules/clothing/head/wig.dm b/code/modules/clothing/head/wig.dm index 00307899410..4bf871a823a 100644 --- a/code/modules/clothing/head/wig.dm +++ b/code/modules/clothing/head/wig.dm @@ -16,7 +16,7 @@ /obj/item/clothing/head/wig/equipped(mob/user, slot) . = ..() - if(ishuman(user) && slot == ITEM_SLOT_HEAD) + if(ishuman(user) && (slot & ITEM_SLOT_HEAD)) item_flags |= EXAMINE_SKIP /obj/item/clothing/head/wig/dropped(mob/user) @@ -103,7 +103,7 @@ /obj/item/clothing/head/wig/natural/visual_equipped(mob/living/carbon/human/user, slot) . = ..() - if(ishuman(user) && slot == ITEM_SLOT_HEAD) + if(ishuman(user) && (slot & ITEM_SLOT_HEAD)) if (color != user.hair_color) // only update if necessary add_atom_colour(user.hair_color, FIXED_COLOUR_PRIORITY) update_appearance() diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index 7c3672c6fdf..21980eb2328 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -21,7 +21,7 @@ /obj/item/clothing/mask/equipped(mob/M, slot) . = ..() - if (slot == ITEM_SLOT_MASK && modifies_speech) + if ((slot & ITEM_SLOT_MASK) && modifies_speech) RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech) else UnregisterSignal(M, COMSIG_MOB_SAY) diff --git a/code/modules/clothing/masks/animal_masks.dm b/code/modules/clothing/masks/animal_masks.dm index 4f16e199673..1c7bbcae78a 100644 --- a/code/modules/clothing/masks/animal_masks.dm +++ b/code/modules/clothing/masks/animal_masks.dm @@ -99,7 +99,7 @@ GLOBAL_LIST_INIT(cursed_animal_masks, list( /obj/item/clothing/mask/animal/equipped(mob/user, slot) if(!iscarbon(user)) return ..() - if(slot == ITEM_SLOT_MASK && HAS_TRAIT_FROM(src, TRAIT_NODROP, CURSED_MASK_TRAIT)) + if((slot & ITEM_SLOT_MASK) && HAS_TRAIT_FROM(src, TRAIT_NODROP, CURSED_MASK_TRAIT)) to_chat(user, span_userdanger("[src] was cursed!")) return ..() diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index b5fbc80443b..819449a7a30 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -27,7 +27,7 @@ /obj/item/clothing/mask/infiltrator/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot != ITEM_SLOT_MASK) + if(!(slot & ITEM_SLOT_MASK)) return to_chat(user, "You roll the balaclava over your face, and a data display appears before your eyes.") ADD_TRAIT(user, TRAIT_DIAGNOSTIC_HUD, MASK_TRAIT) diff --git a/code/modules/clothing/shoes/clown.dm b/code/modules/clothing/shoes/clown.dm index df0bd5a7a5d..ac844ff037e 100644 --- a/code/modules/clothing/shoes/clown.dm +++ b/code/modules/clothing/shoes/clown.dm @@ -19,7 +19,7 @@ /obj/item/clothing/shoes/clown_shoes/equipped(mob/living/user, slot) . = ..() - if(slot == ITEM_SLOT_FEET) + if(slot & ITEM_SLOT_FEET) if(enabled_waddle) user.AddElement(/datum/element/waddling) if(is_clown_job(user.mind?.assigned_role)) diff --git a/code/modules/clothing/shoes/cowboy.dm b/code/modules/clothing/shoes/cowboy.dm index 9ab85d9828e..37706d325bf 100644 --- a/code/modules/clothing/shoes/cowboy.dm +++ b/code/modules/clothing/shoes/cowboy.dm @@ -20,7 +20,7 @@ /obj/item/clothing/shoes/cowboy/equipped(mob/living/carbon/user, slot) . = ..() RegisterSignal(user, COMSIG_LIVING_SLAM_TABLE, .proc/table_slam, override = TRUE) - if(slot == ITEM_SLOT_FEET) + if(slot & ITEM_SLOT_FEET) for(var/mob/living/occupant in contents) var/target_zone = user.get_random_valid_zone(blacklisted_parts = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM), even_weights = TRUE, bypass_warning = TRUE) if(!target_zone) //we broke their legs right on off! diff --git a/code/modules/clothing/shoes/gunboots.dm b/code/modules/clothing/shoes/gunboots.dm index 85c239c4b75..02220ec2b61 100644 --- a/code/modules/clothing/shoes/gunboots.dm +++ b/code/modules/clothing/shoes/gunboots.dm @@ -19,7 +19,7 @@ /obj/item/clothing/shoes/gunboots/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_FEET) + if(slot & ITEM_SLOT_FEET) RegisterSignal(user, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/check_kick) else UnregisterSignal(user, COMSIG_HUMAN_MELEE_UNARMED_ATTACK) diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 98b5aaa0e5a..f8df5dbe1c3 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -13,7 +13,7 @@ /obj/item/clothing/shoes/magboots/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_FEET) + if(slot & ITEM_SLOT_FEET) update_gravity_trait(user) else REMOVE_TRAIT(user, TRAIT_NEGATES_GRAVITY, type) diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index b9d7f4da3be..ddf2cb70c40 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -64,7 +64,7 @@ /// Start Processing on the space suit when it is worn to heat the wearer /obj/item/clothing/suit/space/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_OCLOTHING) // Check that the slot is valid + if(slot & ITEM_SLOT_OCLOTHING) // Check that the slot is valid START_PROCESSING(SSobj, src) update_hud_icon(user) // update the hud diff --git a/code/modules/clothing/suits/costume.dm b/code/modules/clothing/suits/costume.dm index 3be449a46ba..fe5345c3dca 100644 --- a/code/modules/clothing/suits/costume.dm +++ b/code/modules/clothing/suits/costume.dm @@ -163,7 +163,7 @@ /obj/item/clothing/suit/costume/cardborg/equipped(mob/living/user, slot) ..() - if(slot == ITEM_SLOT_OCLOTHING) + if(slot & ITEM_SLOT_OCLOTHING) disguise(user) /obj/item/clothing/suit/costume/cardborg/dropped(mob/living/user) @@ -249,7 +249,7 @@ /obj/item/clothing/head/hooded/carp_hood/equipped(mob/living/carbon/human/user, slot) ..() - if (slot == ITEM_SLOT_HEAD) + if (slot & ITEM_SLOT_HEAD) user.faction |= "carp" /obj/item/clothing/head/hooded/carp_hood/dropped(mob/living/carbon/human/user) diff --git a/code/modules/clothing/suits/ethereal.dm b/code/modules/clothing/suits/ethereal.dm index aec24976c9b..405a9f4e8e5 100644 --- a/code/modules/clothing/suits/ethereal.dm +++ b/code/modules/clothing/suits/ethereal.dm @@ -31,7 +31,7 @@ /obj/item/clothing/suit/hooded/ethereal_raincoat/trailwarden/equipped(mob/living/user, slot) . = ..() - if(isethereal(user) && slot == ITEM_SLOT_OCLOTHING) + if(isethereal(user) && (slot & ITEM_SLOT_OCLOTHING)) var/mob/living/carbon/human/ethereal = user to_chat(ethereal, span_notice("[src] gently quivers for a moment as you put it on.")) set_greyscale(ethereal.dna.species.fixed_mut_color) diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 358ba5a69b2..ddfd117771e 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -28,13 +28,13 @@ ToggleHood() /obj/item/clothing/suit/hooded/item_action_slot_check(slot, mob/user) - if(slot == ITEM_SLOT_OCLOTHING) - return 1 + if(slot & ITEM_SLOT_OCLOTHING) + return TRUE /obj/item/clothing/suit/hooded/equipped(mob/user, slot) - if(slot != ITEM_SLOT_OCLOTHING) + if(!(slot & ITEM_SLOT_OCLOTHING)) RemoveHood() - ..() + return ..() /obj/item/clothing/suit/hooded/proc/RemoveHood() src.icon_state = "[initial(icon_state)]" @@ -97,7 +97,7 @@ /obj/item/clothing/head/hooded/equipped(mob/user, slot) ..() - if(slot != ITEM_SLOT_HEAD) + if(!(slot & ITEM_SLOT_HEAD)) if(suit) suit.RemoveHood() else diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 4a0975aaaa4..1209a1ff94c 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -106,7 +106,7 @@ H.update_worn_undersuit() */ // SKYRAT EDIT END - if(attached_accessory && slot != ITEM_SLOT_HANDS && ishuman(user)) + if(attached_accessory && !(slot & ITEM_SLOT_HANDS) && ishuman(user)) var/mob/living/carbon/human/H = user attached_accessory.on_uniform_equip(src, user) H.fan_hud_set_fandom() @@ -115,7 +115,7 @@ /obj/item/clothing/under/equipped(mob/living/user, slot) ..() - if(slot == ITEM_SLOT_ICLOTHING && freshly_laundered) + if((slot & ITEM_SLOT_ICLOTHING) && freshly_laundered) freshly_laundered = FALSE user.add_mood_event("fresh_laundry", /datum/mood_event/fresh_laundry) @@ -324,7 +324,7 @@ return adjusted = !adjusted if(adjusted) - if(female_sprite_flags != FEMALE_UNIFORM_TOP_ONLY) + if(!(female_sprite_flags & FEMALE_UNIFORM_TOP_ONLY)) female_sprite_flags = NO_FEMALE_UNIFORM if(!alt_covers_chest) // for the special snowflake suits that expose the chest when adjusted (and also the arms, realistically) body_parts_covered &= ~CHEST diff --git a/code/modules/clothing/under/ethereal.dm b/code/modules/clothing/under/ethereal.dm index f8ccd8e524b..7ff5a0b5511 100644 --- a/code/modules/clothing/under/ethereal.dm +++ b/code/modules/clothing/under/ethereal.dm @@ -30,7 +30,7 @@ /obj/item/clothing/under/ethereal_tunic/trailwarden/equipped(mob/living/user, slot) . = ..() - if(isethereal(user) && slot == ITEM_SLOT_ICLOTHING) + if(isethereal(user) && (slot & ITEM_SLOT_ICLOTHING)) var/mob/living/carbon/human/ethereal = user to_chat(ethereal, span_notice("[src] gently quivers for a moment as you put it on.")) set_greyscale(ethereal.dna.species.fixed_mut_color) diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 8aaccb7ea61..0421d77e1ee 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -292,7 +292,7 @@ /obj/item/food/grown/rose/equipped(mob/user, slot, initial) . = ..() - if(slot == ITEM_SLOT_MASK) + if(slot & ITEM_SLOT_MASK) worn_icon_state = "[base_icon_state]_mouth" user.update_worn_mask() else diff --git a/code/modules/mining/equipment/kheiral_cuffs.dm b/code/modules/mining/equipment/kheiral_cuffs.dm index 795dcbb662d..d21d7831f51 100644 --- a/code/modules/mining/equipment/kheiral_cuffs.dm +++ b/code/modules/mining/equipment/kheiral_cuffs.dm @@ -35,11 +35,11 @@ . += span_notice("The cuff's GPS signal is on.") /obj/item/kheiral_cuffs/item_action_slot_check(slot) - return slot == ITEM_SLOT_GLOVES + return (slot & ITEM_SLOT_GLOVES) /obj/item/kheiral_cuffs/equipped(mob/user, slot, initial) . = ..() - if(slot != ITEM_SLOT_GLOVES) + if(!(slot & ITEM_SLOT_GLOVES)) return on_wrist = TRUE playsound(loc, 'sound/weapons/handcuffs.ogg', 30, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) diff --git a/code/modules/mining/lavaland/tendril_loot.dm b/code/modules/mining/lavaland/tendril_loot.dm index 731dddc2da9..deeebf7c044 100644 --- a/code/modules/mining/lavaland/tendril_loot.dm +++ b/code/modules/mining/lavaland/tendril_loot.dm @@ -131,7 +131,7 @@ var/mob/living/carbon/human/active_owner /obj/item/clothing/neck/necklace/memento_mori/item_action_slot_check(slot) - return slot == ITEM_SLOT_NECK + return (slot & ITEM_SLOT_NECK) /obj/item/clothing/neck/necklace/memento_mori/dropped(mob/user) ..() @@ -568,7 +568,7 @@ /obj/item/clothing/gloves/gauntlets/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_GLOVES) + if(slot & ITEM_SLOT_GLOVES) tool_behaviour = TOOL_MINING RegisterSignal(user, COMSIG_HUMAN_EARLY_UNARMED_ATTACK, .proc/rocksmash) RegisterSignal(user, COMSIG_MOVABLE_BUMP, .proc/rocksmash) @@ -729,7 +729,7 @@ /obj/item/clothing/glasses/godeye/equipped(mob/living/user, slot) . = ..() - if(ishuman(user) && slot == ITEM_SLOT_EYES) + if(ishuman(user) && (slot & ITEM_SLOT_EYES)) ADD_TRAIT(src, TRAIT_NODROP, EYE_OF_GOD_TRAIT) pain(user) scan_ability.Grant(user) diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index 626eec5d31f..a22fb1ff8b3 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -117,7 +117,7 @@ There are several things that need to be remembered: icon_file = MONKEY_UNIFORM_FILE //Female sprites have lower priority than digitigrade sprites - else if(dna.species.sexes && (dna.species.bodytype & BODYTYPE_HUMANOID) && physique == FEMALE && uniform.female_sprite_flags != NO_FEMALE_UNIFORM) //Agggggggghhhhh + else if(dna.species.sexes && (dna.species.bodytype & BODYTYPE_HUMANOID) && physique == FEMALE && !(uniform.female_sprite_flags & NO_FEMALE_UNIFORM)) //Agggggggghhhhh woman = TRUE if(!icon_exists(icon_file, RESOLVE_ICON_STATE(uniform))) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index fe0a5b75e60..16599c28447 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -858,9 +858,9 @@ GLOBAL_LIST_EMPTY(features_by_species) if(!(I.slot_flags & slot)) var/excused = FALSE // Anything that's small or smaller can fit into a pocket by default - if((slot == ITEM_SLOT_RPOCKET || slot == ITEM_SLOT_LPOCKET) && I.w_class <= WEIGHT_CLASS_SMALL) + if((slot & (ITEM_SLOT_RPOCKET|ITEM_SLOT_LPOCKET)) && I.w_class <= WEIGHT_CLASS_SMALL) excused = TRUE - else if(slot == ITEM_SLOT_SUITSTORE || slot == ITEM_SLOT_BACKPACK || slot == ITEM_SLOT_HANDS) + else if(slot & (ITEM_SLOT_SUITSTORE|ITEM_SLOT_BACKPACK|ITEM_SLOT_HANDS)) excused = TRUE if(!excused) return FALSE diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm index 8177c2c7819..b392f4ecabe 100644 --- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm +++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm @@ -232,6 +232,6 @@ var/mob/living/in_the_way_mob = crossed if(iscarbon(in_the_way_mob) && !in_the_way_mob.combat_mode) return - if(in_the_way_mob.pass_flags == PASSTABLE) + if(in_the_way_mob.pass_flags & PASSTABLE) return in_the_way_mob.knockOver(owner) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index f24136d4757..87515fd790e 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real to_chat(user, span_warning("You can't reach the wiring!")) return - if(W.slot_flags & ITEM_SLOT_HEAD && hat_offset != INFINITY && !user.combat_mode && !is_type_in_typecache(W, GLOB.blacklisted_borg_hats)) + if((W.slot_flags & ITEM_SLOT_HEAD) && hat_offset != INFINITY && !user.combat_mode && !is_type_in_typecache(W, GLOB.blacklisted_borg_hats)) if(user == src) to_chat(user, span_notice("You can't seem to manage to place [W] on your head by yourself!") ) return @@ -68,7 +68,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real to_chat(user, span_warning("This defibrillator unit will not function on a deceased cyborg!")) return var/obj/item/defibrillator/D = W - if(D.slot_flags != ITEM_SLOT_BACK) //belt defibs need not apply + if(!(D.slot_flags & ITEM_SLOT_BACK)) //belt defibs need not apply to_chat(user, span_warning("This defibrillator unit doesn't seem to fit correctly!")) return if(D.cell) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm index bca18789ba8..fd186850e53 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm @@ -277,7 +277,7 @@ Difficulty: Extremely Hard /obj/item/clothing/shoes/winterboots/ice_boots/ice_trail/equipped(mob/user, slot) . = ..() - if(slot == ITEM_SLOT_FEET) + if(slot & ITEM_SLOT_FEET) ADD_TRAIT(src, TRAIT_NODROP, CURSED_ITEM_TRAIT(type)) /obj/item/clothing/shoes/winterboots/ice_boots/ice_trail/dropped(mob/user) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/brimdemon.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/brimdemon.dm index 9aacf4f3f26..51f30aee8de 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/brimdemon.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/brimdemon.dm @@ -220,7 +220,7 @@ /obj/item/ore_sensor/equipped(mob/user, slot, initial) . = ..() - if(slot == ITEM_SLOT_EARS) + if(slot & ITEM_SLOT_EARS) START_PROCESSING(SSobj, src) else STOP_PROCESSING(SSobj, src) diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm index cc9b2ab405e..77fc184f260 100644 --- a/code/modules/mod/mod_control.dm +++ b/code/modules/mod/mod_control.dm @@ -240,7 +240,7 @@ /obj/item/mod/control/equipped(mob/user, slot) ..() - if(slot == slot_flags) + if(slot & slot_flags) set_wearer(user) else if(wearer) unset_wearer() @@ -252,7 +252,7 @@ clean_up() /obj/item/mod/control/item_action_slot_check(slot) - if(slot == slot_flags) + if(slot & slot_flags) return TRUE /obj/item/mod/control/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) diff --git a/code/modules/modular_computers/file_system/programs/atmosscan.dm b/code/modules/modular_computers/file_system/programs/atmosscan.dm index c4867955ee1..3e86d542a27 100644 --- a/code/modules/modular_computers/file_system/programs/atmosscan.dm +++ b/code/modules/modular_computers/file_system/programs/atmosscan.dm @@ -57,7 +57,7 @@ var/list/data = get_header_data() var/turf/turf = get_turf(computer) data["atmozphereMode"] = atmozphere_mode - data["clickAtmozphereCompatible"] = computer.hardware_flag == PROGRAM_TABLET + data["clickAtmozphereCompatible"] = (computer.hardware_flag & PROGRAM_TABLET) switch (atmozphere_mode) //Null air wont cause errors, don't worry. if(ATMOZPHERE_SCAN_ENV) var/datum/gas_mixture/air = turf?.return_air() @@ -77,7 +77,7 @@ atmozphere_mode = ATMOZPHERE_SCAN_ENV UnregisterSignal(computer, COMSIG_ITEM_ATTACK_SELF_SECONDARY) return TRUE - if(computer.hardware_flag != PROGRAM_TABLET) + if(!(computer.hardware_flag & PROGRAM_TABLET)) computer.say("Device incompatible for scanning objects!") return FALSE atmozphere_mode = ATMOZPHERE_SCAN_CLICK diff --git a/code/modules/paperwork/fax.dm b/code/modules/paperwork/fax.dm index 40255285be9..9c0c1f682bd 100644 --- a/code/modules/paperwork/fax.dm +++ b/code/modules/paperwork/fax.dm @@ -128,7 +128,7 @@ if (new_fax_name != fax_name) if (fax_name_exist(new_fax_name)) // Being able to set the same name as another fax machine will give a lot of gimmicks for the traitor. - if (syndicate_network != TRUE && obj_flags != EMAGGED) + if (syndicate_network != TRUE && !(obj_flags & EMAGGED)) to_chat(user, span_warning("There is already a fax machine with this name on the network.")) return TOOL_ACT_TOOLTYPE_SUCCESS user.log_message("renamed [fax_name] (fax machine) to [new_fax_name].", LOG_GAME) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index d953617b4fb..64c6320cd2c 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -418,7 +418,7 @@ var/mob/living/carbon/human/stunned_human = stunned_mob if(istype(stunned_human.glasses, /obj/item/clothing/glasses/meson)) var/obj/item/clothing/glasses/meson/check_meson = stunned_human.glasses - if(check_meson.vision_flags == SEE_TURFS) + if(check_meson.vision_flags & SEE_TURFS) to_chat(stunned_human, span_notice("You look directly into the [name], good thing you had your protective eyewear on!")) continue diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index ff2f4b6a214..44b107f5f04 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -873,7 +873,7 @@ return FALSE //Yup, no reactions here. No siree. if(is_reacting)//Prevent wasteful calculations - if(datum_flags != DF_ISPROCESSING)//If we're reacting - but not processing (i.e. we've transfered) + if(!(datum_flags & DF_ISPROCESSING))//If we're reacting - but not processing (i.e. we've transfered) START_PROCESSING(SSreagents, src) if(!(has_changed_state())) return FALSE diff --git a/code/modules/reagents/reagent_containers/cups/_cup.dm b/code/modules/reagents/reagent_containers/cups/_cup.dm index bff6159ab3e..465ab2f1233 100644 --- a/code/modules/reagents/reagent_containers/cups/_cup.dm +++ b/code/modules/reagents/reagent_containers/cups/_cup.dm @@ -373,7 +373,7 @@ /obj/item/reagent_containers/cup/bucket/equipped(mob/user, slot) . = ..() - if (slot == ITEM_SLOT_HEAD) + if (slot & ITEM_SLOT_HEAD) if(reagents.total_volume) to_chat(user, span_userdanger("[src]'s contents spill all over you!")) reagents.expose(user, TOUCH) diff --git a/code/modules/research/xenobiology/crossbreeding/_clothing.dm b/code/modules/research/xenobiology/crossbreeding/_clothing.dm index 2e8d8c5d6cd..d08507f1f66 100644 --- a/code/modules/research/xenobiology/crossbreeding/_clothing.dm +++ b/code/modules/research/xenobiology/crossbreeding/_clothing.dm @@ -19,7 +19,7 @@ Slimecrossing Armor /obj/item/clothing/mask/nobreath/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot == ITEM_SLOT_MASK) + if(slot & ITEM_SLOT_MASK) user.failed_last_breath = FALSE user.clear_alert(ALERT_NOT_ENOUGH_OXYGEN) user.apply_status_effect(/datum/status_effect/rebreathing) @@ -37,7 +37,7 @@ Slimecrossing Armor var/glasses_color = "#FFFFFF" /obj/item/clothing/glasses/prism_glasses/item_action_slot_check(slot) - if(slot == ITEM_SLOT_EYES) + if(slot & ITEM_SLOT_EYES) return TRUE /obj/structure/light_prism diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 2541fc3e0b9..4c285946bd3 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -254,7 +254,7 @@ /obj/item/surgical_processor/equipped(mob/user, slot, initial) . = ..() - if(slot != ITEM_SLOT_HANDS) + if(!(slot & ITEM_SLOT_HANDS)) UnregisterSignal(user, COMSIG_SURGERY_STARTING) return RegisterSignal(user, COMSIG_SURGERY_STARTING, .proc/check_surgery) diff --git a/modular_skyrat/master_files/code/modules/clothing/glasses/nerve_staple.dm b/modular_skyrat/master_files/code/modules/clothing/glasses/nerve_staple.dm index 2b618fc8c6d..757e9f6cac4 100644 --- a/modular_skyrat/master_files/code/modules/clothing/glasses/nerve_staple.dm +++ b/modular_skyrat/master_files/code/modules/clothing/glasses/nerve_staple.dm @@ -15,7 +15,7 @@ /obj/item/clothing/glasses/nerve_staple/equipped(mob/user, slot) . = ..() - if (slot == ITEM_SLOT_EYES) + if (slot & ITEM_SLOT_EYES) ADD_TRAIT(src, TRAIT_NODROP, CLOTHING_TRAIT) else REMOVE_TRAIT(src, TRAIT_NODROP, CLOTHING_TRAIT) diff --git a/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm b/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm index c0437c1abe0..19b11160445 100644 --- a/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm +++ b/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm @@ -29,7 +29,7 @@ /obj/item/clothing/head/helmet/monkey_sentience/equipped(mob/user, slot) . = ..() - if(slot != ITEM_SLOT_HEAD) + if(!(slot & ITEM_SLOT_HEAD)) return if(istype(user, /mob/living/carbon/human/dummy)) // Prevents ghosts from being polled when the helmet is put on a dummy. return diff --git a/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm b/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm index c9b447e077b..cd7f2367cc9 100644 --- a/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm +++ b/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm @@ -979,7 +979,7 @@ /obj/item/clothing/glasses/welding/steampunk_goggles/item_action_slot_check(slot, mob/user) . = ..() - if(. && slot == ITEM_SLOT_HEAD) + if(. && (slot & ITEM_SLOT_HEAD)) return FALSE /obj/item/clothing/glasses/welding/steampunk_goggles/attack_self(mob/user) diff --git a/modular_skyrat/modules/modular_items/code/necklace.dm b/modular_skyrat/modules/modular_items/code/necklace.dm index a7b387be08c..178bece894a 100644 --- a/modular_skyrat/modules/modular_items/code/necklace.dm +++ b/modular_skyrat/modules/modular_items/code/necklace.dm @@ -14,7 +14,7 @@ . = ..() if(!ishuman(user)) return - if(slot == ITEM_SLOT_NECK) + if(slot & ITEM_SLOT_NECK) user.grant_language(/datum/language/ashtongue/, TRUE, TRUE, LANGUAGE_TRANSLATOR) to_chat(user, span_boldnotice("Slipping the necklace on, you feel the insidious creep of the Necropolis enter your bones, and your very shadow. You find yourself with an unnatural knowledge of Ashtongue; but the amulet's eye stares at you.")) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/deprivation_helmet.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/deprivation_helmet.dm index b7e4f7c1ec1..4c2ddc813db 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/deprivation_helmet.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/deprivation_helmet.dm @@ -339,7 +339,7 @@ // Here goes code that applies stuff on the wearer /obj/item/clothing/head/helmet/space/deprivation_helmet/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot != ITEM_SLOT_HEAD) + if(!(slot & ITEM_SLOT_HEAD)) return //Save current sound states var/mob_client = usr.client diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/hypnogoggles.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/hypnogoggles.dm index 86006db7fac..ff28976dde2 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/hypnogoggles.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/hypnogoggles.dm @@ -21,7 +21,7 @@ /obj/item/clothing/glasses/hypno/equipped(mob/user, slot)//Adding hypnosis on equip . = ..() victim = user - if(slot != ITEM_SLOT_EYES) + if(!(slot & ITEM_SLOT_EYES)) return if(!(iscarbon(victim) && victim.client?.prefs?.read_preference(/datum/preference/toggle/erp/sex_toy))) return diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_headphones.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_headphones.dm index 015c8c1dfc2..aba95c06121 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_headphones.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_headphones.dm @@ -51,7 +51,7 @@ //we equipping it so we deaf now /obj/item/clothing/ears/kinky_headphones/equipped(mob/living/carbon/human/user, slot) . = ..() - if(!(istype(user) && slot == ITEM_SLOT_EARS)) + if(!(istype(user) && (slot & ITEM_SLOT_EARS))) return to_chat(user, span_purple("[!kinky_headphones_on ? "You can barely hear anything! Your other senses have become more apparent..." : "Strange but relaxing music fills your mind. You feel so... Calm."]")) ADD_TRAIT(user, TRAIT_DEAF, CLOTHING_TRAIT) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_sleepbag.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_sleepbag.dm index 168c5e32bff..e646d165c56 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_sleepbag.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/kinky_sleepbag.dm @@ -103,7 +103,7 @@ /obj/item/clothing/suit/straight_jacket/kinky_sleepbag/equipped(mob/user, slot) var/mob/living/carbon/human/affected_human = user - if(ishuman(user) && slot == ITEM_SLOT_OCLOTHING) + if(ishuman(user) && (slot & ITEM_SLOT_OCLOTHING)) ADD_TRAIT(user, TRAIT_FLOORED, CLOTHING_TRAIT) affected_human.cut_overlay(affected_human.overlays_standing[SHOES_LAYER]) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/shockcollar.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/shockcollar.dm index 40951ef1113..804eb2a7318 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/shockcollar.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_clothing/shockcollar.dm @@ -87,7 +87,7 @@ /obj/item/electropack/shockcollar/pacify/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot == ITEM_SLOT_NECK) + if(slot & ITEM_SLOT_NECK) ADD_TRAIT(user, TRAIT_PACIFISM, "pacifying-collar") /obj/item/electropack/shockcollar/pacify/dropped(mob/living/carbon/human/user) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/condom.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/condom.dm index ddc41486647..75f4b028640 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/condom.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/condom.dm @@ -85,7 +85,7 @@ //When condom equipped we doing stuff /obj/item/clothing/sextoy/condom/equipped(mob/user, slot, initial) . = ..() - if(slot == ITEM_SLOT_PENIS && condom_state == "unused") + if((slot & ITEM_SLOT_PENIS) && condom_state == "unused") condom_state = "used" update_icon_state() update_icon() diff --git a/modular_skyrat/modules/opposing_force/code/items.dm b/modular_skyrat/modules/opposing_force/code/items.dm index 79c33496a70..1c3968d0592 100644 --- a/modular_skyrat/modules/opposing_force/code/items.dm +++ b/modular_skyrat/modules/opposing_force/code/items.dm @@ -65,7 +65,7 @@ /obj/item/clothing/suit/toggle/lawyer/black/better/heister/equipped(mob/living/user, slot) . = ..() - if(slot != ITEM_SLOT_OCLOTHING) + if(!(slot & ITEM_SLOT_OCLOTHING)) return RegisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS, .proc/armor_reaction)