fix borg actions (#21235)
This commit is contained in:
parent
87b6876720
commit
5d366604e2
|
|
@ -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<BorgChassisComponent>(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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selects a module, enablind the borg to use its provided abilities.
|
||||
/// Selects a module, enabling the borg to use its provided abilities.
|
||||
/// </summary>
|
||||
public void SelectModule(EntityUid chassis,
|
||||
EntityUid moduleUid,
|
||||
|
|
|
|||
Loading…
Reference in New Issue