mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
[MIRROR] Properly checks flags with & instead of == [MDB IGNORE] (#16487)
* Properly checks flags with & instead of == * merge fixed for changeling * skyrat equipment updated Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Tastyfish <crazychris32@gmail.com>
This commit is contained in:
co-authored by
John Willard
Tastyfish
parent
de331bbe60
commit
32db6d2411
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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!"))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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.
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!"))
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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."))
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
+1
-1
@@ -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])
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user