Files
tbd-station-14/Content.Server/Administration/Commands/ClearBluespaceLockerLinks.cs
Chief-Engineer b7af5e6109 Fix and improve bluespace lockers (#13139)
* add invulnerable plastitanium wall prototype

* fix command ClearBluespaceLockerLinks.cs

* fix and improve BluespaceLockerSystem.cs

* fix normal plastitanium wall suffix

* fix capitalization

* fix capability to create one way lockers
2022-12-24 22:35:03 -06:00

34 lines
1.2 KiB
C#

using Content.Server.Storage.Components;
using Content.Shared.Administration;
using Robust.Shared.Console;
namespace Content.Server.Administration.Commands;
[AdminCommand(AdminFlags.Admin)]
public sealed class ClearBluespaceLockerLinks : IConsoleCommand
{
public string Command => "clearbluespacelockerlinks";
public string Description => "Removes the bluespace links of the given uid. Does not remove links this uid is the target of.";
public string Help => "Usage: clearbluespacelockerlinks <storage uid>";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
shell.WriteError(Loc.GetString("shell-wrong-arguments-number"));
return;
}
if (!EntityUid.TryParse(args[0], out var entityUid))
{
shell.WriteError(Loc.GetString("shell-entity-uid-must-be-number"));
return;
}
var entityManager = IoCManager.Resolve<IEntityManager>();
if (entityManager.TryGetComponent<BluespaceLockerComponent>(entityUid, out var originComponent))
entityManager.RemoveComponent(entityUid, originComponent);
}
}