[MIRROR] More globals (#12341)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-01-30 20:27:42 +01:00
committed by GitHub
co-authored by Kashargul
parent 38e634dce7
commit d031fa3c4e
76 changed files with 267 additions and 257 deletions
+5 -5
View File
@@ -480,7 +480,7 @@
user.position_hud_item(src,slot)
if(user.client) user.client.screen |= src
if(user.pulling == src) user.stop_pulling()
if(("[slot]" in slot_flags_enumeration) && (slot_flags & slot_flags_enumeration["[slot]"]))
if(("[slot]" in GLOB.slot_flags_enumeration) && (slot_flags & GLOB.slot_flags_enumeration["[slot]"]))
if(equip_sound && !muffled_by_belly(user))
playsound(src, equip_sound, 20, preference = /datum/preference/toggle/pickup_sounds)
else if(!muffled_by_belly(user))
@@ -518,7 +518,7 @@
return
//Defines which slots correspond to which slot flags
var/list/global/slot_flags_enumeration = list(
GLOBAL_LIST_INIT(slot_flags_enumeration, list(
"[slot_wear_mask]" = SLOT_MASK,
"[slot_back]" = SLOT_BACK,
"[slot_wear_suit]" = SLOT_OCLOTHING,
@@ -532,7 +532,7 @@ var/list/global/slot_flags_enumeration = list(
"[slot_w_uniform]" = SLOT_ICLOTHING,
"[slot_wear_id]" = SLOT_ID,
"[slot_tie]" = SLOT_TIE,
)
))
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
@@ -553,8 +553,8 @@ var/list/global/slot_flags_enumeration = list(
return 0
//First check if the item can be equipped to the desired slot.
if("[slot]" in slot_flags_enumeration)
var/req_flags = slot_flags_enumeration["[slot]"]
if("[slot]" in GLOB.slot_flags_enumeration)
var/req_flags = GLOB.slot_flags_enumeration["[slot]"]
if(!(req_flags & slot_flags))
return 0