From 84b55c48f227fdafccdbdce62e17cb56ff2c5632 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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; + var selected = chassisComp.SelectedModule; + args.Handled = true; - if (chassisComp.SelectedModule == uid) + UnselectModule(chassis, chassisComp); + + if (selected != uid) { - UnselectModule(chassis, chassisComp); - return; + SelectModule(chassis, uid, chassisComp, component); } - - 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, -- 2.51.2