From d02b49b50159bf08d6945648e11016a705c3beff Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sat, 1 Jan 2022 16:16:45 +1300 Subject: [PATCH] fix-alt click (#5977) --- .../Interaction/SharedInteractionSystem.cs | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index 92d1f836b6..bbf8b44adb 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -156,23 +156,21 @@ namespace Content.Shared.Interaction return; } - else - { - // We are close to the nearby object. - if (altInteract) - // Perform alternative interactions, using context menu verbs. - AltInteract(user, target.Value); - if (!hands.TryGetActiveHeldEntity(out var heldEntity)) - { - // Since our hand is empty we will use InteractHand/Activate - InteractHand(user, target.Value); - } - else if (heldEntity != target) - { - await InteractUsing(user, heldEntity.Value, target.Value, coordinates); - } - + // We are close to the nearby object. + if (altInteract) + { + // Perform alternative interactions, using context menu verbs. + AltInteract(user, target.Value); + } + else if (!hands.TryGetActiveHeldEntity(out var heldEntity)) + { + // Since our hand is empty we will use InteractHand/Activate + InteractHand(user, target.Value); + } + else if (heldEntity != target) + { + await InteractUsing(user, heldEntity.Value, target.Value, coordinates); } }