Elevates (almost all) inventory variables from /carbon to /human (#96955)

## About The Pull Request

Moves all inventory slots but handcuffs/legcuffs (as those can be used
by xenos) from ``/carbon`` onto ``/human``, as xenos do not use any of
those inventory slots, only leaving them in use by humans. Their
presence on ``/carbon`` is an artifact of times when monkeys weren't
humans, and some of the slots had to be shared by all carbons.
In some places I've used ``get_item_by_slot`` rather than swapping
checks to ``ishuman`` for simplicity's sake, in some places it might not
be the most optimal solution but in cases like help act any other
solution would require a refactor of the whole (massive) proc.

## Why It's Good For The Game

Cleaner/more sensible code, one step closer to fully datumized
inventories.

## Changelog
🆑
refactor: Moved a lot of human-specific inventory code onto human mobs,
report if inventories break!
/🆑
This commit is contained in:
SmArtKar
2026-07-16 03:03:50 -07:00
committed by GitHub
parent 156beffc62
commit 677f070995
43 changed files with 288 additions and 412 deletions
@@ -200,7 +200,7 @@
arm_owner.dropItemToGround(lost_cuffs, force = TRUE)
arm_owner.hud_used?.update_inventory_slot(ITEM_SLOT_HANDS, held_index)
if(arm_owner.num_hands == 0)
arm_owner.dropItemToGround(arm_owner.gloves, force = TRUE)
arm_owner.dropItemToGround(arm_owner.get_item_by_slot(ITEM_SLOT_GLOVES), force = TRUE)
arm_owner.update_worn_gloves() //to remove the bloody hands overlay
/obj/item/bodypart/leg/drop_limb(special, dismembered, move_to_floor = TRUE)
@@ -209,12 +209,12 @@
if(special || !leg_owner)
return
leg_owner.dropItemToGround(leg_owner.legcuffed, force = TRUE)
leg_owner.dropItemToGround(leg_owner.shoes, force = TRUE)
leg_owner.dropItemToGround(leg_owner.get_item_by_slot(ITEM_SLOT_FEET), force = TRUE)
/obj/item/bodypart/head/drop_limb(special, dismembered, move_to_floor = TRUE)
if(!special)
//Drop all worn head items
for(var/obj/item/head_item as anything in list(owner.glasses, owner.ears, owner.wear_mask, owner.head))
for(var/obj/item/head_item as anything in owner.get_items_by_slots(ITEM_SLOT_EYES | ITEM_SLOT_EARS | ITEM_SLOT_MASK | ITEM_SLOT_HEAD))
owner.dropItemToGround(head_item, force = TRUE)
//Handle dental implants