mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
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:
@@ -237,7 +237,7 @@
|
||||
//Intensity of the laser dot to pass to flash_act
|
||||
var/severity = pick(0, 1, 2)
|
||||
var/always_fail = FALSE
|
||||
if(istype(target_humanoid.glasses, /obj/item/clothing/glasses/eyepatch) && prob(50))
|
||||
if(istype(target_humanoid.get_item_by_slot(ITEM_SLOT_EYES), /obj/item/clothing/glasses/eyepatch) && prob(50))
|
||||
always_fail = TRUE
|
||||
|
||||
//chance to actually hit the eyes depends on internal component
|
||||
|
||||
@@ -33,11 +33,9 @@
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/electropack/attack_hand(mob/user, list/modifiers)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(src == C.back)
|
||||
to_chat(user, span_warning("You need help taking this off!"))
|
||||
return
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BACK) == src)
|
||||
to_chat(user, span_warning("You need help taking this off!"))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/electropack/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
||||
|
||||
Reference in New Issue
Block a user