fix borg actions (#21235)
This commit is contained in:
@@ -3,7 +3,6 @@ using Content.Shared.Hands.Components;
|
|||||||
using Content.Shared.Interaction.Components;
|
using Content.Shared.Interaction.Components;
|
||||||
using Content.Shared.Silicons.Borgs.Components;
|
using Content.Shared.Silicons.Borgs.Components;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Utility;
|
|
||||||
|
|
||||||
namespace Content.Server.Silicons.Borgs;
|
namespace Content.Server.Silicons.Borgs;
|
||||||
|
|
||||||
@@ -89,18 +88,19 @@ public sealed partial class BorgSystem
|
|||||||
if (!TryComp<BorgChassisComponent>(chassis, out var chassisComp))
|
if (!TryComp<BorgChassisComponent>(chassis, out var chassisComp))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
args.Handled = true;
|
var selected = chassisComp.SelectedModule;
|
||||||
if (chassisComp.SelectedModule == uid)
|
|
||||||
{
|
|
||||||
UnselectModule(chassis, chassisComp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SelectModule(chassis, uid, chassisComp, component);
|
args.Handled = true;
|
||||||
|
UnselectModule(chassis, chassisComp);
|
||||||
|
|
||||||
|
if (selected != uid)
|
||||||
|
{
|
||||||
|
SelectModule(chassis, uid, chassisComp, component);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selects a module, enablind the borg to use its provided abilities.
|
/// Selects a module, enabling the borg to use its provided abilities.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SelectModule(EntityUid chassis,
|
public void SelectModule(EntityUid chassis,
|
||||||
EntityUid moduleUid,
|
EntityUid moduleUid,
|
||||||
|
|||||||
Reference in New Issue
Block a user