From 8794b3bcffdc0213df3a10d0efcbbb8a6958bbe8 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 16 Aug 2021 00:53:21 +0200 Subject: [PATCH] [MIRROR] Fixes right click on circuit controller (#7584) * Fixes right click on circuit controller (#60840) Co-authored-by: Colovorat * Fixes right click on circuit controller Co-authored-by: Colovorat <35225170+Colovorat@users.noreply.github.com> Co-authored-by: Colovorat --- code/modules/wiremod/shell/controller.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/wiremod/shell/controller.dm b/code/modules/wiremod/shell/controller.dm index 20b08ca8262..d3af0ca88e8 100644 --- a/code/modules/wiremod/shell/controller.dm +++ b/code/modules/wiremod/shell/controller.dm @@ -43,17 +43,17 @@ /obj/item/circuit_component/controller/register_shell(atom/movable/shell) RegisterSignal(shell, COMSIG_ITEM_ATTACK_SELF, .proc/send_trigger) RegisterSignal(shell, COMSIG_CLICK_ALT, .proc/send_alternate_signal) - RegisterSignal(shell, COMSIG_ATOM_ATTACK_HAND_SECONDARY, .proc/send_right_signal) + RegisterSignal(shell, COMSIG_ITEM_ATTACK_SELF_SECONDARY, .proc/send_right_signal) /obj/item/circuit_component/controller/unregister_shell(atom/movable/shell) UnregisterSignal(shell, list( COMSIG_ITEM_ATTACK_SELF, - COMSIG_ATOM_ATTACK_HAND_SECONDARY, + COMSIG_ITEM_ATTACK_SELF_SECONDARY, COMSIG_CLICK_ALT, )) /** - * Called when the shell item is used in hand, including right click. + * Called when the shell item is used in hand */ /obj/item/circuit_component/controller/proc/send_trigger(atom/source, mob/user) SIGNAL_HANDLER @@ -76,6 +76,9 @@ entity.set_output(user) alt.set_output(COMPONENT_SIGNAL) +/** + * Called when the shell item is right-clicked in active hand + */ /obj/item/circuit_component/controller/proc/send_right_signal(atom/source, mob/user) SIGNAL_HANDLER if(!user.Adjacent(source))