Allow MODsuit storage Bag (ShiftB) keybinding (#23629)

* Fix MODsuit storage keybinding issue

Resolved issue where Shift + B key combination did not put items into MODsuit storage. Updated the quick_equip_item method to handle MODsuits and allow items to be inserted into MODsuit storage using key bindings. Therefore Fixes #23152.

* return messages (of errors and confirmation)

* Update code/modules/mob/living/carbon/human/human_inventory.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

---------

Co-authored-by: Pierre-Louis <hernandezpierrelouis@protonmail.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
Pierre-Louis
2024-01-08 15:17:15 -08:00
committed by GitHub
co-authored by Ryan Pierre-Louis
parent 05e85010b5
commit e8d2b06d6f
@@ -444,6 +444,11 @@
var/obj/item/storage/equipped_item = get_item_by_slot(slot_item)
if(ismecha(loc) || HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
return
if(ismodcontrol(equipped_item)) // Check if the item is a MODsuit
if(thing && equipped_item.can_be_inserted(thing)) // Check if the item can be inserted into the MODsuit
equipped_item.handle_item_insertion(thing) // Insert the item into the MODsuit
playsound(loc, "rustle", 50, TRUE, -5)
return
if(!istype(equipped_item)) // We also let you equip things like this
equip_to_slot_if_possible(thing, slot_item)
return