mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Removes the non bitflag slot defines (#47742)
Removes the non bitflag slot defines
This commit is contained in:
committed by
Rob Bailey
parent
d6816fddb6
commit
5481515dff
@@ -427,15 +427,15 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
A.Grant(user)
|
||||
item_flags |= IN_INVENTORY
|
||||
if(!initial)
|
||||
if(equip_sound &&(slot_flags & slotdefine2slotbit(slot)))
|
||||
if(equip_sound && (slot_flags & slot))
|
||||
playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE)
|
||||
else if(slot == SLOT_HANDS)
|
||||
else if(slot == ITEM_SLOT_HANDS)
|
||||
playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
//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 == SLOT_IN_BACKPACK || slot == SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there
|
||||
if(slot == ITEM_SLOT_BACKPACK || slot == ITEM_SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -655,7 +655,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(ismob(location))
|
||||
var/mob/M = location
|
||||
var/success = FALSE
|
||||
if(src == M.get_item_by_slot(SLOT_WEAR_MASK))
|
||||
if(src == M.get_item_by_slot(ITEM_SLOT_MASK))
|
||||
success = TRUE
|
||||
if(success)
|
||||
location = get_turf(M)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
user.put_in_hands(PA)
|
||||
|
||||
/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user)
|
||||
if(slot == SLOT_BACK)
|
||||
if(slot == ITEM_SLOT_BACK)
|
||||
return 1
|
||||
|
||||
/obj/item/gun/energy/chrono_gun
|
||||
|
||||
@@ -90,7 +90,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
..()
|
||||
|
||||
/obj/item/proc/help_light_cig(mob/living/M)
|
||||
var/mask_item = M.get_item_by_slot(SLOT_WEAR_MASK)
|
||||
var/mask_item = M.get_item_by_slot(ITEM_SLOT_MASK)
|
||||
if(istype(mask_item, /obj/item/clothing/mask/cigarette))
|
||||
return mask_item
|
||||
|
||||
@@ -144,7 +144,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
if(starts_lit)
|
||||
light()
|
||||
AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(SLOT_WEAR_MASK))//90% to knock off when wearing a mask
|
||||
AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(ITEM_SLOT_MASK))//90% to knock off when wearing a mask
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -864,7 +864,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
/obj/item/clothing/mask/vape/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(slot == SLOT_WEAR_MASK)
|
||||
if(slot == ITEM_SLOT_MASK)
|
||||
if(!screw)
|
||||
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
|
||||
DISABLE_BITFIELD(reagents.flags, NO_REACT)
|
||||
@@ -874,7 +874,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
/obj/item/clothing/mask/vape/dropped(mob/user)
|
||||
. = ..()
|
||||
if(user.get_item_by_slot(SLOT_WEAR_MASK) == src)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_MASK) == src)
|
||||
ENABLE_BITFIELD(reagents.flags, NO_REACT)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
@@ -92,13 +92,13 @@
|
||||
/obj/item/defibrillator/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(slot_flags == ITEM_SLOT_BACK)
|
||||
if(user.get_item_by_slot(SLOT_BACK) == src)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BACK) == src)
|
||||
ui_action_click()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Put the defibrillator on your back first!</span>")
|
||||
|
||||
else if(slot_flags == ITEM_SLOT_BELT)
|
||||
if(user.get_item_by_slot(SLOT_BELT) == src)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BELT) == src)
|
||||
ui_action_click()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Strap the defibrillator's belt on first!</span>")
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
/obj/item/defibrillator/equipped(mob/user, slot)
|
||||
..()
|
||||
if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT))
|
||||
if((slot_flags == ITEM_SLOT_BACK && slot != ITEM_SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != ITEM_SLOT_BELT))
|
||||
remove_paddles(user)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/item/megaphone/equipped(mob/M, slot)
|
||||
. = ..()
|
||||
if (slot == SLOT_HANDS)
|
||||
if (slot == ITEM_SLOT_HANDS)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
else
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
@@ -88,7 +88,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt/leader
|
||||
name = "team leader headset"
|
||||
@@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
|
||||
/obj/item/radio/headset/headset_sec/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|
||||
|
||||
/obj/item/radio/headset/headset_eng
|
||||
name = "engineering radio headset"
|
||||
@@ -180,7 +180,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
|
||||
/obj/item/radio/headset/heads/captain/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|
||||
|
||||
/obj/item/radio/headset/heads/rd
|
||||
name = "\proper the research director's headset"
|
||||
@@ -202,7 +202,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
|
||||
/obj/item/radio/headset/heads/hos/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|
||||
|
||||
/obj/item/radio/headset/heads/ce
|
||||
name = "\proper the chief engineer's headset"
|
||||
@@ -263,7 +263,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
|
||||
/obj/item/radio/headset/headset_cent/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|
||||
|
||||
/obj/item/radio/headset/silicon/pai
|
||||
name = "\proper mini Integrated Subspace Transceiver "
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/obj/item/reverse_bear_trap/attack_hand(mob/user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.get_item_by_slot(SLOT_HEAD) == src)
|
||||
if(C.get_item_by_slot(ITEM_SLOT_HEAD) == src)
|
||||
if(HAS_TRAIT_FROM(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT) && !struggling)
|
||||
struggling = TRUE
|
||||
var/fear_string
|
||||
@@ -82,26 +82,26 @@
|
||||
..()
|
||||
|
||||
/obj/item/reverse_bear_trap/attack(mob/living/target, mob/living/user)
|
||||
if(target.get_item_by_slot(SLOT_HEAD))
|
||||
if(target.get_item_by_slot(ITEM_SLOT_HEAD))
|
||||
to_chat(user, "<span class='warning'>Remove [target.p_their()] headgear first!</span>")
|
||||
return
|
||||
target.visible_message("<span class='warning'>[user] starts forcing [src] onto [target]'s head!</span>", \
|
||||
"<span class='userdanger'>[target] starts forcing [src] onto your head!</span>", "<i>You hear clanking.</i>")
|
||||
to_chat(user, "<span class='danger'>You start forcing [src] onto [target]'s head...</span>")
|
||||
if(!do_after(user, 30, target = target) || target.get_item_by_slot(SLOT_HEAD))
|
||||
if(!do_after(user, 30, target = target) || target.get_item_by_slot(ITEM_SLOT_HEAD))
|
||||
return
|
||||
target.visible_message("<span class='warning'>[user] forces and locks [src] onto [target]'s head!</span>", \
|
||||
"<span class='userdanger'>[target] locks [src] onto your head!</span>", "<i>You hear a click, and then a timer ticking down.</i>")
|
||||
to_chat(user, "<span class='danger'>You force [src] onto [target]'s head and click the padlock shut.</span>")
|
||||
user.dropItemToGround(src)
|
||||
target.equip_to_slot_if_possible(src, SLOT_HEAD)
|
||||
target.equip_to_slot_if_possible(src, ITEM_SLOT_HEAD)
|
||||
arm()
|
||||
notify_ghosts("[user] put a reverse bear trap on [target]!", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, ghost_sound = 'sound/machines/beep.ogg', notify_volume = 75, header = "Reverse bear trap armed")
|
||||
|
||||
/obj/item/reverse_bear_trap/proc/snap()
|
||||
reset()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(!istype(H) || H.get_item_by_slot(SLOT_HEAD) != src)
|
||||
if(!istype(H) || H.get_item_by_slot(ITEM_SLOT_HEAD) != src)
|
||||
visible_message("<span class='warning'>[src]'s jaws snap open with an ear-piercing crack!</span>")
|
||||
playsound(src, 'sound/effects/snap.ogg', 75, TRUE)
|
||||
else
|
||||
|
||||
@@ -188,7 +188,7 @@ effective or pretty fucking useless.
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
|
||||
/obj/item/shadowcloak/ui_action_click(mob/user)
|
||||
if(user.get_item_by_slot(SLOT_BELT) == src)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BELT) == src)
|
||||
if(!on)
|
||||
Activate(usr)
|
||||
else
|
||||
@@ -196,7 +196,7 @@ effective or pretty fucking useless.
|
||||
return
|
||||
|
||||
/obj/item/shadowcloak/item_action_slot_check(slot, mob/user)
|
||||
if(slot == SLOT_BELT)
|
||||
if(slot == ITEM_SLOT_BELT)
|
||||
return 1
|
||||
|
||||
/obj/item/shadowcloak/proc/Activate(mob/living/carbon/human/user)
|
||||
@@ -218,11 +218,11 @@ effective or pretty fucking useless.
|
||||
|
||||
/obj/item/shadowcloak/dropped(mob/user)
|
||||
..()
|
||||
if(user && user.get_item_by_slot(SLOT_BELT) != src)
|
||||
if(user && user.get_item_by_slot(ITEM_SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
|
||||
/obj/item/shadowcloak/process()
|
||||
if(user.get_item_by_slot(SLOT_BELT) != src)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
var/obj/item/clothing/magichead = new /obj/item/clothing/mask/horsehead/cursed(user.drop_location())
|
||||
if(!user.dropItemToGround(user.wear_mask))
|
||||
qdel(user.wear_mask)
|
||||
user.equip_to_slot_if_possible(magichead, SLOT_WEAR_MASK, TRUE, TRUE)
|
||||
user.equip_to_slot_if_possible(magichead, ITEM_SLOT_MASK, TRUE, TRUE)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user,"<span class='notice'>I say thee neigh</span>") //It still lives here
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_POCKET
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_POCKETS
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
component_type = /datum/component/storage/concrete/stack
|
||||
var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it
|
||||
|
||||
@@ -77,7 +77,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
||||
if(icon_state == "honk1" || icon_state == "honk2")
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), SLOT_WEAR_MASK)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), ITEM_SLOT_MASK)
|
||||
if(icon_state == "insuls")
|
||||
var/mob/living/carbon/human/H =usr
|
||||
var/obj/item/clothing/gloves/color/fyellow/insuls = new
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, M)
|
||||
M.equip_to_slot_if_possible(W, SLOT_WEAR_MASK)
|
||||
M.equip_to_slot_if_possible(W, ITEM_SLOT_MASK)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take \a [W] out of the pack.</span>")
|
||||
else
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
/obj/item/watertank/equipped(mob/user, slot)
|
||||
..()
|
||||
if(slot != SLOT_BACK)
|
||||
if(slot != ITEM_SLOT_BACK)
|
||||
remove_noz()
|
||||
|
||||
/obj/item/watertank/proc/remove_noz()
|
||||
@@ -351,14 +351,14 @@
|
||||
toggle_injection()
|
||||
|
||||
/obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user)
|
||||
if(slot == SLOT_BACK)
|
||||
if(slot == ITEM_SLOT_BACK)
|
||||
return 1
|
||||
|
||||
/obj/item/reagent_containers/chemtank/proc/toggle_injection()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(!istype(user))
|
||||
return
|
||||
if (user.get_item_by_slot(SLOT_BACK) != src)
|
||||
if (user.get_item_by_slot(ITEM_SLOT_BACK) != src)
|
||||
to_chat(user, "<span class='warning'>The chemtank needs to be on your back before you can activate it!</span>")
|
||||
return
|
||||
if(on)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
else //something wrong
|
||||
name = "[initial(name)]"
|
||||
update_icon()
|
||||
if(user.get_item_by_slot(SLOT_BACK) == src)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BACK) == src)
|
||||
user.update_inv_back()
|
||||
else
|
||||
user.update_inv_hands()
|
||||
@@ -184,15 +184,14 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/twohanded/required/equipped(mob/user, slot)
|
||||
..()
|
||||
var/slotbit = slotdefine2slotbit(slot)
|
||||
if(slot_flags & slotbit)
|
||||
. = ..()
|
||||
if(slot_flags & slot)
|
||||
var/datum/O = user.is_holding_item_of_type(/obj/item/twohanded/offhand)
|
||||
if(!O || QDELETED(O))
|
||||
return
|
||||
qdel(O)
|
||||
return
|
||||
if(slot == SLOT_HANDS)
|
||||
if(slot == ITEM_SLOT_HANDS)
|
||||
wield(user)
|
||||
else
|
||||
unwield(user)
|
||||
|
||||
@@ -144,16 +144,16 @@
|
||||
if(M.head && wash_obj(M.head))
|
||||
M.update_inv_head()
|
||||
|
||||
if(M.glasses && !(SLOT_GLASSES in obscured) && wash_obj(M.glasses))
|
||||
if(M.glasses && !(ITEM_SLOT_EYES in obscured) && wash_obj(M.glasses))
|
||||
M.update_inv_glasses()
|
||||
|
||||
if(M.wear_mask && !(SLOT_WEAR_MASK in obscured) && wash_obj(M.wear_mask))
|
||||
if(M.wear_mask && !(ITEM_SLOT_MASK in obscured) && wash_obj(M.wear_mask))
|
||||
M.update_inv_wear_mask()
|
||||
|
||||
if(M.ears && !(HIDEEARS in obscured) && wash_obj(M.ears))
|
||||
M.update_inv_ears()
|
||||
|
||||
if(M.wear_neck && !(SLOT_NECK in obscured) && wash_obj(M.wear_neck))
|
||||
if(M.wear_neck && !(ITEM_SLOT_NECK in obscured) && wash_obj(M.wear_neck))
|
||||
M.update_inv_neck()
|
||||
|
||||
if(M.shoes && !(HIDESHOES in obscured) && wash_obj(M.shoes))
|
||||
|
||||
Reference in New Issue
Block a user