Gives all nuclear bombs unique codes (#11665)

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Flipp Syder
2022-10-09 12:28:08 -07:00
committed by GitHub
parent 410983c2d4
commit 8838f8be24
9 changed files with 181 additions and 102 deletions

View File

@@ -10,12 +10,22 @@ namespace Content.Server.Nuke.Commands
public sealed class SendNukeCodesCommand : IConsoleCommand
{
public string Command => "nukecodes";
public string Description => "Send nuke codes to the communication console";
public string Help => "nukecodes";
public string Description => "Send nuke codes to a station's communication consoles";
public string Help => "nukecodes [station EntityUid]";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
EntitySystem.Get<NukeCodeSystem>().SendNukeCodes();
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);
}
}
}