From f0251e4faae6b844093c2f639908826247a8d137 Mon Sep 17 00:00:00 2001 From: Garen Crownguard <22408776+Garen7@users.noreply.github.com> Date: Thu, 4 Jul 2019 14:48:10 -0500 Subject: [PATCH] Fix quickdraw hotkeys working while incapacitated (#44953) The check for incapacitated is normally done in the click proc since that way it's checked on all of attack_hand, attackby, etc.. The keybinding uses attack_hand instead of the click proc because it would go through as a shift click and examine the item instead of grabbing it if the click proc was used. --- code/modules/keybindings/bindings_human.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/keybindings/bindings_human.dm b/code/modules/keybindings/bindings_human.dm index 43549aa7c99..c404acfcb7c 100644 --- a/code/modules/keybindings/bindings_human.dm +++ b/code/modules/keybindings/bindings_human.dm @@ -2,6 +2,8 @@ if(client.keys_held["Shift"]) switch(_key) if("E") // Put held thing in belt or take out most recent thing from belt + if(incapacitated()) + return var/obj/item/thing = get_active_held_item() var/obj/item/equipped_belt = get_item_by_slot(SLOT_BELT) if(!equipped_belt) // We also let you equip a belt like this @@ -31,6 +33,8 @@ return if("B") // Put held thing in backpack or take out most recent thing from backpack + if(incapacitated()) + return var/obj/item/thing = get_active_held_item() var/obj/item/equipped_back = get_item_by_slot(SLOT_BACK) if(!equipped_back) // We also let you equip a backpack like this