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
+1 -1
View File
@@ -483,7 +483,7 @@
if(!in_range(source, victim))
return FALSE
if(victim.wearing_shock_proof_gloves())
if(victim.get_item_by_slot(ITEM_SLOT_GLOVES)?.siemens_coefficient == 0)
SEND_SIGNAL(victim, COMSIG_LIVING_SHOCK_PREVENTED, power_source, source, siemens_coeff, dist_check)
return FALSE //to avoid spamming with insulated gloves on