2021-11-11 04:29:11 +03:00
|
|
|
|
using Content.Server.Administration;
|
|
|
|
|
|
using Content.Shared.Administration;
|
|
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
|
using Robust.Shared.Console;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Nuke.Commands
|
|
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
|
[AdminCommand(AdminFlags.Fun)]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class SendNukeCodesCommand : IConsoleCommand
|
2021-11-11 04:29:11 +03:00
|
|
|
|
{
|
|
|
|
|
|
public string Command => "nukecodes";
|
2022-10-09 12:28:08 -07:00
|
|
|
|
public string Description => "Send nuke codes to a station's communication consoles";
|
|
|
|
|
|
public string Help => "nukecodes [station EntityUid]";
|
2021-11-11 04:29:11 +03:00
|
|
|
|
|
|
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
|
|
|
|
{
|
2022-10-09 12:28:08 -07:00
|
|
|
|
if (args.Length != 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
shell.WriteError("shell-need-exactly-one-argument");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!EntityUid.TryParse(args[0], out var uid))
|
|
|
|
|
|
{
|
|
|
|
|
|
shell.WriteError(Loc.GetString("shell-entity-uid-must-be-number"));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
IoCManager.Resolve<EntityManager>().System<NukeCodePaperSystem>().SendNukeCodes(uid);
|
2021-11-11 04:29:11 +03:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|