From e8d2b06d6fdf1ede99143f25695e739e517cda9f Mon Sep 17 00:00:00 2001 From: Pierre-Louis <44984704+PIerreLouisH@users.noreply.github.com> Date: Tue, 9 Jan 2024 00:17:15 +0100 Subject: [PATCH] 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 Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_inventory.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human_inventory.dm b/code/modules/mob/living/carbon/human/human_inventory.dm index d8bda565092..76ef81a1f3a 100644 --- a/code/modules/mob/living/carbon/human/human_inventory.dm +++ b/code/modules/mob/living/carbon/human/human_inventory.dm @@ -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