diff --git a/code/modules/keybindings/bindings_human.dm b/code/modules/keybindings/bindings_human.dm index 5d02d9aedba..658ca87badf 100644 --- a/code/modules/keybindings/bindings_human.dm +++ b/code/modules/keybindings/bindings_human.dm @@ -3,16 +3,17 @@ switch(_key) if("E") // Put held thing in belt or take out most recent thing from belt var/obj/item/thing = get_active_held_item() - var/obj/item/storage/equipped_belt = get_item_by_slot(SLOT_BELT) + var/obj/item/equipped_belt = get_item_by_slot(SLOT_BELT) if(!equipped_belt) // We also let you equip a belt like this if(!thing) to_chat(user, "You have no belt to take something out of.") return - equip_to_slot_if_possible(thing, SLOT_BELT) + if(equip_to_slot_if_possible(thing, SLOT_BELT)) + update_inv_hands() return - if(!istype(equipped_belt)) // not a storage item + if(!SEND_SIGNAL(equipped_belt, COMSIG_CONTAINS_STORAGE)) // not a storage item if(!thing) - to_chat(user, "You have no belt to take something out of.") + equipped_belt.attack_hand(src) else to_chat(user, "You can't fit anything in.") return @@ -31,27 +32,28 @@ if("B") // Put held thing in backpack or take out most recent thing from backpack var/obj/item/thing = get_active_held_item() - var/obj/item/storage/equipped_backpack = get_item_by_slot(SLOT_BACK) - if(!equipped_backpack) // We also let you equip a backpack like this + var/obj/item/equipped_back = get_item_by_slot(SLOT_BACK) + if(!equipped_back) // We also let you equip a backpack like this if(!thing) to_chat(user, "You have no backpack to take something out of.") return - equip_to_slot_if_possible(thing, SLOT_BACK) + if(equip_to_slot_if_possible(thing, SLOT_BACK)) + update_inv_hands() return - if(!istype(equipped_backpack)) // not a storage item + if(!SEND_SIGNAL(equipped_back, COMSIG_CONTAINS_STORAGE)) // not a storage item if(!thing) - to_chat(user, "You have no backpack to take something out of.") + equipped_back.attack_hand(src) else to_chat(user, "You can't fit anything in.") return if(thing) // put thing in backpack - if(!SEND_SIGNAL(equipped_backpack, COMSIG_TRY_STORAGE_INSERT, thing, user.mob)) + if(!SEND_SIGNAL(equipped_back, COMSIG_TRY_STORAGE_INSERT, thing, user.mob)) to_chat(user, "You can't fit anything in.") return - if(!equipped_backpack.contents.len) // nothing to take out + if(!equipped_back.contents.len) // nothing to take out to_chat(user, "There's nothing in your backpack to take out.") return - var/obj/item/stored = equipped_backpack.contents[equipped_backpack.contents.len] + var/obj/item/stored = equipped_back.contents[equipped_back.contents.len] if(!stored || stored.on_found(src)) return stored.attack_hand(src) // take out thing from backpack diff --git a/interface/interface.dm b/interface/interface.dm index 8a4ba5b96bf..e49d4d64b4e 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -124,8 +124,8 @@ Hotkey-Mode: (hotkey-mode must be on) \th = stop pulling \tx = swap-hand \tz = activate held object (or y) -\tShift+e = Put held item into belt or take out most recent item added to belt. -\tShift+b = Put held item into backpack or take out most recent item added to backpack. +\tShift+e = Put held item into belt(or belt slot) or take out most recent item added. +\tShift+b = Put held item into backpack(or back slot) or take out most recent item added. \tf = cycle-intents-left \tg = cycle-intents-right \t1 = help-intent