From 5596813a206f9bbb4a7136c4c6ed993fcc9c881d Mon Sep 17 00:00:00 2001 From: Blundir Date: Sat, 28 Oct 2023 00:16:15 +0300 Subject: [PATCH] initial --- code/__DEFINES/keybinding.dm | 1 + code/datums/keybinding/human_combat.dm | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/code/__DEFINES/keybinding.dm b/code/__DEFINES/keybinding.dm index 88f194bb33df..5a0809d83ac1 100644 --- a/code/__DEFINES/keybinding.dm +++ b/code/__DEFINES/keybinding.dm @@ -87,6 +87,7 @@ #define COMSIG_KB_HUMAN_WEAPON_UNLOAD "keybinding_human_weapon_unload" #define COMSIG_KB_HUMAN_WEAPON_ATTACHMENT "keybinding_human_weapon_attachment" #define COMSIG_KB_HUMAN_WEAPON_ATTACHMENT_RAIL "keybinding_human_weapon_attachment_rail" +#define COMSIG_KB_HUMAN_WEAPON_SHOTGUN_TUBE "keybinding_human_weapon_shotgun_tube" #define COMSIG_KB_HUMAN_WEAPON_TOGGLE_IFF "keybinding_human_weapon_toggle_iff" diff --git a/code/datums/keybinding/human_combat.dm b/code/datums/keybinding/human_combat.dm index 2f37efc61438..39b1386f8bcd 100644 --- a/code/datums/keybinding/human_combat.dm +++ b/code/datums/keybinding/human_combat.dm @@ -190,3 +190,19 @@ var/obj/item/weapon/gun/rifle/m46c/COgun = held_item COgun.toggle_iff(human) return TRUE + +/datum/keybinding/human/combat/toggle_shotgun_tube + hotkey_keys = list("Unbound") + classic_keys = list("Unbound") + name = "toggle_shotgun_tube" + full_name = "Toggle Shotgun Tube" + keybind_signal = COMSIG_KB_HUMAN_WEAPON_SHOTGUN_TUBE + +/datum/keybinding/human/combat/toggle_shotgun_tube/down(client/user) + . = ..() + if(.) + return + var/mob/living/carbon/human/human = user.mob + var/obj/item/weapon/gun/shotgun/pump/dual_tube/held_item = human.get_held_item() + held_item.toggle_tube() + return TRUE