From 5d366604e2cebcc27f69155b8a768bfb38ad21d2 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Sat, 4 Nov 2023 09:29:19 -0400 Subject: [PATCH] fix borg actions (#21235) --- .../Silicons/Borgs/BorgSystem.Modules.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs index c080420266..228f32ad90 100644 --- a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs +++ b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs @@ -3,7 +3,6 @@ using Content.Shared.Hands.Components; using Content.Shared.Interaction.Components; using Content.Shared.Silicons.Borgs.Components; using Robust.Shared.Containers; -using Robust.Shared.Utility; namespace Content.Server.Silicons.Borgs; @@ -89,18 +88,19 @@ public sealed partial class BorgSystem if (!TryComp(chassis, out var chassisComp)) return; - args.Handled = true; - if (chassisComp.SelectedModule == uid) - { - UnselectModule(chassis, chassisComp); - return; - } + var selected = chassisComp.SelectedModule; - SelectModule(chassis, uid, chassisComp, component); + args.Handled = true; + UnselectModule(chassis, chassisComp); + + if (selected != uid) + { + SelectModule(chassis, uid, chassisComp, component); + } } /// - /// Selects a module, enablind the borg to use its provided abilities. + /// Selects a module, enabling the borg to use its provided abilities. /// public void SelectModule(EntityUid chassis, EntityUid moduleUid,