Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] Consolidates SLOT_FLAG and SLOT_HUD into one ITEM_SLOT flag #26743

Merged
merged 41 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5ccf59c
IT WORKS UP UNTIL THIS POINT
Sep 10, 2024
c56ffe2
Consolidates SLOT_FLAG and SLOT_HUD into one
Sep 10, 2024
c4a6c02
Remove cover_both_ears
Sep 10, 2024
251be45
SLOT_HUD to ITEM_SLOT
Sep 10, 2024
f0a9ec2
Remove clothing_trait changes for the time being
Sep 10, 2024
056f3bd
Remove accidental copy-paste
Sep 10, 2024
e579305
Re-add no-slip var
Sep 10, 2024
a86cad9
More failure to copy-paste correctly
Sep 10, 2024
a56e886
Leftover flag
Sep 10, 2024
921542d
Combine left and right slot flags where possible
Sep 10, 2024
546613b
UNGOOF MY DEFINES, PHAND IS NOT A THING
Sep 10, 2024
1c7464c
Minor spacing changes
Sep 10, 2024
17f90a1
Merge remote-tracking branch 'upstream/master' into SLOT_FLAG_NONESENSE
Sep 10, 2024
ffece4b
Some more fixes from merge
Sep 10, 2024
f562d55
Seperates ITEM SLOT AMOUNT into two defines
Sep 10, 2024
e65ed7a
ON SECOND THOUGHT LETS NOT DO THAT.
Sep 10, 2024
417b430
Addresses Contra's review
Sep 10, 2024
de292d9
Thank you GREP
Sep 10, 2024
c48f8f5
Rename ITEM_SLOT_FEET to ITEM_SLOT_SHOES
Sep 10, 2024
1b3ab47
Added a comment to the bitmasks in clothing defines
Sep 10, 2024
ec0fb4a
Rename ITEM_SLOT_TIE to ITEM_SLOT_ACCESSORY
Sep 11, 2024
2177c92
Merge branch 'master' into SLOT_FLAG_NONESENSE
Adrer Sep 11, 2024
91cb26a
These are for a seperate PR.
Sep 12, 2024
c1f5033
Merge branch 'SLOT_FLAG_NONESENSE' of https://github.com/Adrer/Paradi…
Sep 12, 2024
b66cf5f
Merge remote-tracking branch 'upstream/master' into SLOT_FLAG_NONESENSE
Oct 12, 2024
2dad555
Magboot fixes
Oct 12, 2024
07675de
Requested changes
Oct 21, 2024
0fddc80
Merge branch 'SLOT_FLAG_NONESENSE' of https://github.com/Adrer/Paradi…
Oct 21, 2024
68bfd7d
Re-add accidental removal
Oct 21, 2024
6104459
Wrong flags
Oct 21, 2024
0efa9c1
Merge remote-tracking branch 'upstream/master' into SLOT_FLAG_NONESENSE
Oct 21, 2024
c615533
Update code/__DEFINES/clothing_defines.dm
Adrer Nov 3, 2024
e342b99
Requested changes
Nov 3, 2024
8a33c58
Merge branch 'SLOT_FLAG_NONESENSE' of https://github.com/Adrer/Paradi…
Nov 3, 2024
dc665a1
Merge branch 'master' into SLOT_FLAG_NONESENSE
Nov 3, 2024
daaf527
Merge remote-tracking branch 'upstream/master' into SLOT_FLAG_NONESENSE
Nov 3, 2024
4dc5f17
Merge fixes
Nov 3, 2024
a42e36c
Merge remote-tracking branch 'upstream/master' into SLOT_FLAG_NONESENSE
Nov 7, 2024
ed1ba67
Merge branch 'SLOT_FLAG_NONESENSE' of https://github.com/Adrer/Paradi…
Nov 7, 2024
248433d
Fix double headset
Nov 11, 2024
3ffc036
Fixes multiple accessories
Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 34 additions & 27 deletions code/__DEFINES/clothing_defines.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
//Item inventory slots bitmasks
#define ITEM_SLOT_BACK (1<<0) // back
#define ITEM_SLOT_MASK (1<<1) // mask
#define ITEM_SLOT_HANDCUFFED (1<<2) // handcuffs
#define ITEM_SLOT_LEFT_HAND (1<<3) // l_hand
#define ITEM_SLOT_RIGHT_HAND (1<<4) // r_hand
#define ITEM_SLOT_BOTH_HANDS (ITEM_SLOT_LEFT_HAND | ITEM_SLOT_RIGHT_HAND)
#define ITEM_SLOT_BELT (1<<5) // belt
#define ITEM_SLOT_ID (1<<6) // id
#define ITEM_SLOT_LEFT_EAR (1<<7) // l_ear
#define ITEM_SLOT_RIGHT_EAR (1<<8) // r_ear
#define ITEM_SLOT_BOTH_EARS (ITEM_SLOT_LEFT_EAR | ITEM_SLOT_RIGHT_EAR)
#define ITEM_SLOT_EYES (1<<9) // eyes
#define ITEM_SLOT_GLOVES (1<<10) // gloves
#define ITEM_SLOT_HEAD (1<<11) // head
#define ITEM_SLOT_SHOES (1<<12) // shoes
#define ITEM_SLOT_OUTER_SUIT (1<<13) // wear_suit
#define ITEM_SLOT_JUMPSUIT (1<<14) // w_uniform
#define ITEM_SLOT_LEFT_POCKET (1<<15) // l_store
#define ITEM_SLOT_RIGHT_POCKET (1<<16) // r_store
#define ITEM_SLOT_BOTH_POCKETS (ITEM_SLOT_LEFT_POCKET | ITEM_SLOT_RIGHT_POCKET)
#define ITEM_SLOT_SUIT_STORE (1<<17) // suit_storage
#define ITEM_SLOT_IN_BACKPACK (1<<18) // this just puts stuff a backpack if you have one
#define ITEM_SLOT_LEGCUFFED (1<<19) // legcuffs
#define ITEM_SLOT_PDA (1<<20) // pda
#define ITEM_SLOT_ACCESSORY (1<<21) // accessories
#define ITEM_SLOT_COLLAR (1<<22) // pet collar
#define ITEM_SLOT_AMOUNT_FLAG (1<<ITEM_SLOT_AMOUNT)
#define ITEM_SLOT_AMOUNT 22 // IF YOU ADD ANY NEW CLOTHING SLOTS, MAKE SURE TO UPDATE THIS TO THE AMOUNT OF SLOTS.

/// Translates an ITEM_SLOT back to an index that can be looked up in inv_slots. e.g. (1<<19) becomes 19.
#define ITEM_SLOT_2_INDEX(slot) (log(2, slot) + 1)

//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
#define HIDEGLOVES (1<<0) //APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDESUITSTORAGE (1<<1) //APPLIES ONLY TO THE EXTERIOR SUIT!!
Expand All @@ -10,33 +43,6 @@
#define HIDEEYES (1<<2) //APPLIES ONLY TO HELMETS/MASKS!! (eyes means glasses)
#define HIDEFACE (1<<3) //APPLIES ONLY TO HELMETS/MASKS!! Dictates whether we appear as unknown.

// Slot defines for var/list/inv_slots, some of these dont really show up on the HUD,
// but still function like it in other ways. I know thats weird, and I hate it too.
#define SLOT_HUD_BACK 1
#define SLOT_HUD_WEAR_MASK 2
#define SLOT_HUD_HANDCUFFED 3
#define SLOT_HUD_LEFT_HAND 4 // l_hand
#define SLOT_HUD_RIGHT_HAND 5 // r_hand
#define SLOT_HUD_BELT 6
#define SLOT_HUD_WEAR_ID 7
#define SLOT_HUD_LEFT_EAR 8 // l_ear
#define SLOT_HUD_GLASSES 9
#define SLOT_HUD_GLOVES 10
#define SLOT_HUD_HEAD 11
#define SLOT_HUD_SHOES 12
#define SLOT_HUD_OUTER_SUIT 13 // wear_suit
#define SLOT_HUD_JUMPSUIT 14 // w_uniform
#define SLOT_HUD_LEFT_STORE 15 // l_store
#define SLOT_HUD_RIGHT_STORE 16 // r_store
#define SLOT_HUD_SUIT_STORE 17
#define SLOT_HUD_IN_BACKPACK 18 // this just puts stuff a backpack if you have one
#define SLOT_HUD_LEGCUFFED 19
#define SLOT_HUD_RIGHT_EAR 20 // r_ear
#define SLOT_HUD_WEAR_PDA 21
#define SLOT_HUD_TIE 22
#define SLOT_HUD_COLLAR 23
#define SLOT_HUD_AMOUNT 23

// Boolean defines for hands
#define HAND_BOOL_RIGHT 0
#define HAND_BOOL_LEFT 1
Expand Down Expand Up @@ -104,3 +110,4 @@
#define MUZZLE_MUTE_NONE 0 // Does not mute you.
#define MUZZLE_MUTE_MUFFLE 1 // Muffles everything you say "MHHPHHMMM!!!
#define MUZZLE_MUTE_ALL 2 // Completely mutes you.

19 changes: 1 addition & 18 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define NONE 0

//FLAGS BITMASK
#define STOPSPRESSUREDMAGE (1<<0) //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_FLAG_BACK) if you see it anywhere To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
#define STOPSPRESSUREDMAGE (1<<0) //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & ITEM_SLOT_BACK) if you see it anywhere To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
#define NODROP (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
#define NOBLUDGEON (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message with the default handler
#define AIRTIGHT (1<<3) // mask allows internals
Expand Down Expand Up @@ -146,23 +146,6 @@
#define NO_LAVA_GEN (1<<1) //Blocks lava rivers being generated on the turf
#define NO_RUINS (1<<2)

//ITEM INVENTORY SLOT BITMASKS
#define SLOT_FLAG_OCLOTHING (1<<0)
#define SLOT_FLAG_ICLOTHING (1<<1)
#define SLOT_FLAG_GLOVES (1<<2)
#define SLOT_FLAG_EYES (1<<3)
#define SLOT_FLAG_EARS (1<<4)
#define SLOT_FLAG_MASK (1<<5)
#define SLOT_FLAG_HEAD (1<<6)
#define SLOT_FLAG_FEET (1<<7)
#define SLOT_FLAG_ID (1<<8)
#define SLOT_FLAG_BELT (1<<9)
#define SLOT_FLAG_BACK (1<<10)
#define SLOT_FLAG_POCKET (1<<11) //this is to allow items with a w_class of 3 or 4 to fit in pockets.
#define SLOT_FLAG_TWOEARS (1<<12)
#define SLOT_FLAG_PDA (1<<13)
#define SLOT_FLAG_TIE (1<<14)

//ORGAN TYPE FLAGS
#define AFFECT_ROBOTIC_ORGAN 1
#define AFFECT_ORGANIC_ORGAN 2
Expand Down
28 changes: 0 additions & 28 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1967,34 +1967,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
if(CHANNEL_SURGERY_SOUNDS)
return "Surgery Sounds"

/proc/slot_bitfield_to_slot(input_slot_flags) // Kill off this garbage ASAP; slot flags and clothing flags should be IDENTICAL. GOSH DARN IT. Doesn't work with ears or pockets, either.
switch(input_slot_flags)
if(SLOT_FLAG_OCLOTHING)
return SLOT_HUD_OUTER_SUIT
if(SLOT_FLAG_ICLOTHING)
return SLOT_HUD_JUMPSUIT
if(SLOT_FLAG_GLOVES)
return SLOT_HUD_GLOVES
if(SLOT_FLAG_EYES)
return SLOT_HUD_GLASSES
if(SLOT_FLAG_MASK)
return SLOT_HUD_WEAR_MASK
if(SLOT_FLAG_HEAD)
return SLOT_HUD_HEAD
if(SLOT_FLAG_FEET)
return SLOT_HUD_SHOES
if(SLOT_FLAG_ID)
return SLOT_HUD_WEAR_ID
if(SLOT_FLAG_BELT)
return SLOT_HUD_BELT
if(SLOT_FLAG_BACK)
return SLOT_HUD_BACK
if(SLOT_FLAG_PDA)
return SLOT_HUD_WEAR_PDA
if(SLOT_FLAG_TIE)
return SLOT_HUD_TIE


/**
* HTTP Get (Powered by RUSTG)
*
Expand Down
6 changes: 3 additions & 3 deletions code/_onclick/hud/alien_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "hand_r"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = SLOT_HUD_RIGHT_HAND
inv_box.slot_id = ITEM_SLOT_RIGHT_HAND
static_inventory += inv_box

inv_box = new /atom/movable/screen/inventory/hand()
inv_box.name = "l_hand"
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "hand_l"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = SLOT_HUD_LEFT_HAND
inv_box.slot_id = ITEM_SLOT_LEFT_HAND
static_inventory += inv_box

using = new /atom/movable/screen/swap_hand()
Expand Down Expand Up @@ -143,7 +143,7 @@
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
inv_slots[ITEM_SLOT_2_INDEX(inv.slot_id)] = inv
inv.update_icon()

/datum/hud/alien/persistent_inventory_update(mob/viewer)
Expand Down
10 changes: 5 additions & 5 deletions code/_onclick/hud/hud_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
//the screen objects that display mob info (health, alien plasma, etc...)
var/list/infodisplay = list()
/// /atom/movable/screen/inventory objects, ordered by their slot ID.
var/list/inv_slots[SLOT_HUD_AMOUNT]
var/list/inv_slots[ITEM_SLOT_AMOUNT]
Adrer marked this conversation as resolved.
Show resolved Hide resolved

var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
///Assoc list of controller groups, associated with key string group name with value of the plane master controller ref
Expand Down Expand Up @@ -205,10 +205,10 @@
screenmob.client.screen += infodisplay

//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
if(inv_slots[SLOT_HUD_LEFT_HAND])
screenmob.client.screen += inv_slots[SLOT_HUD_LEFT_HAND] //we want the hands to be visible
if(inv_slots[SLOT_HUD_RIGHT_HAND])
screenmob.client.screen += inv_slots[SLOT_HUD_RIGHT_HAND] //we want the hands to be visible
if(inv_slots[ITEM_SLOT_2_INDEX(ITEM_SLOT_LEFT_HAND)])
screenmob.client.screen += inv_slots[ITEM_SLOT_2_INDEX(ITEM_SLOT_LEFT_HAND)] //we want the hands to be visible
if(inv_slots[ITEM_SLOT_2_INDEX(ITEM_SLOT_RIGHT_HAND)])
screenmob.client.screen += inv_slots[ITEM_SLOT_2_INDEX(ITEM_SLOT_RIGHT_HAND)] //we want the hands to be visible
if(action_intent)
screenmob.client.screen += action_intent //we want the intent switcher visible
action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
Expand Down
40 changes: 20 additions & 20 deletions code/_onclick/hud/human_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "i_clothing"
inv_box.icon = ui_style
inv_box.slot_id = SLOT_HUD_JUMPSUIT
inv_box.slot_id = ITEM_SLOT_JUMPSUIT
inv_box.icon_state = "uniform"
inv_box.screen_loc = ui_iclothing
inv_box.color = ui_color
Expand All @@ -123,7 +123,7 @@
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "o_clothing"
inv_box.icon = ui_style
inv_box.slot_id = SLOT_HUD_OUTER_SUIT
inv_box.slot_id = ITEM_SLOT_OUTER_SUIT
inv_box.icon_state = "suit"
inv_box.screen_loc = ui_oclothing
inv_box.color = ui_color
Expand All @@ -137,7 +137,7 @@
inv_box.color = ui_color
inv_box.alpha = ui_alpha
inv_box.screen_loc = ui_rhand
inv_box.slot_id = SLOT_HUD_RIGHT_HAND
inv_box.slot_id = ITEM_SLOT_RIGHT_HAND
static_inventory += inv_box

inv_box = new /atom/movable/screen/inventory/hand()
Expand All @@ -147,7 +147,7 @@
inv_box.color = ui_color
inv_box.alpha = ui_alpha
inv_box.screen_loc = ui_lhand
inv_box.slot_id = SLOT_HUD_LEFT_HAND
inv_box.slot_id = ITEM_SLOT_LEFT_HAND
static_inventory += inv_box

using = new /atom/movable/screen/swap_hand()
Expand All @@ -173,7 +173,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "id"
inv_box.screen_loc = ui_id
inv_box.slot_id = SLOT_HUD_WEAR_ID
inv_box.slot_id = ITEM_SLOT_ID
inv_box.color = ui_color
inv_box.alpha = ui_alpha
static_inventory += inv_box
Expand All @@ -183,7 +183,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "pda"
inv_box.screen_loc = ui_pda
inv_box.slot_id = SLOT_HUD_WEAR_PDA
inv_box.slot_id = ITEM_SLOT_PDA
inv_box.color = ui_color
inv_box.alpha = ui_alpha
static_inventory += inv_box
Expand All @@ -193,7 +193,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "mask"
inv_box.screen_loc = ui_mask
inv_box.slot_id = SLOT_HUD_WEAR_MASK
inv_box.slot_id = ITEM_SLOT_MASK
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
Expand All @@ -203,7 +203,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "back"
inv_box.screen_loc = ui_back
inv_box.slot_id = SLOT_HUD_BACK
inv_box.slot_id = ITEM_SLOT_BACK
inv_box.color = ui_color
inv_box.alpha = ui_alpha
static_inventory += inv_box
Expand All @@ -213,7 +213,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = SLOT_HUD_LEFT_STORE
inv_box.slot_id = ITEM_SLOT_LEFT_POCKET
inv_box.color = ui_color
inv_box.alpha = ui_alpha
static_inventory += inv_box
Expand All @@ -223,7 +223,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = SLOT_HUD_RIGHT_STORE
inv_box.slot_id = ITEM_SLOT_RIGHT_POCKET
inv_box.color = ui_color
inv_box.alpha = ui_alpha
static_inventory += inv_box
Expand All @@ -235,7 +235,7 @@
inv_box.color = ui_color
inv_box.alpha = ui_alpha
inv_box.screen_loc = ui_sstore1
inv_box.slot_id = SLOT_HUD_SUIT_STORE
inv_box.slot_id = ITEM_SLOT_SUIT_STORE
static_inventory += inv_box

using = new /atom/movable/screen/resist()
Expand Down Expand Up @@ -264,7 +264,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
inv_box.screen_loc = ui_gloves
inv_box.slot_id = SLOT_HUD_GLOVES
inv_box.slot_id = ITEM_SLOT_GLOVES
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
Expand All @@ -274,7 +274,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
inv_box.screen_loc = ui_glasses
inv_box.slot_id = SLOT_HUD_GLASSES
inv_box.slot_id = ITEM_SLOT_EYES
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
Expand All @@ -284,7 +284,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "ears"
inv_box.screen_loc = ui_l_ear
inv_box.slot_id = SLOT_HUD_LEFT_EAR
inv_box.slot_id = ITEM_SLOT_LEFT_EAR
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
Expand All @@ -294,7 +294,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "ears"
inv_box.screen_loc = ui_r_ear
inv_box.slot_id = SLOT_HUD_RIGHT_EAR
inv_box.slot_id = ITEM_SLOT_RIGHT_EAR
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
Expand All @@ -304,7 +304,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "head"
inv_box.screen_loc = ui_head
inv_box.slot_id = SLOT_HUD_HEAD
inv_box.slot_id = ITEM_SLOT_HEAD
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
Expand All @@ -314,7 +314,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
inv_box.screen_loc = ui_shoes
inv_box.slot_id = SLOT_HUD_SHOES
inv_box.slot_id = ITEM_SLOT_SHOES
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
Expand All @@ -324,7 +324,7 @@
inv_box.icon = ui_style
inv_box.icon_state = "belt"
inv_box.screen_loc = ui_belt
inv_box.slot_id = SLOT_HUD_BELT
inv_box.slot_id = ITEM_SLOT_BELT
inv_box.color = ui_color
inv_box.alpha = ui_alpha
static_inventory += inv_box
Expand Down Expand Up @@ -377,7 +377,7 @@
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
inv_slots[ITEM_SLOT_2_INDEX(inv.slot_id)] = inv
inv.update_icon()

update_locked_slots()
Expand All @@ -391,7 +391,7 @@
var/datum/species/S = H.dna.species
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
if(inv.slot_id in S.no_equip)
if(inv.slot_id & S.no_equip)
inv.alpha = hud_alpha / 2
else
inv.alpha = hud_alpha
Expand Down
Loading