From 505caa556e127d82bbdc6dab4a495442da21aaa5 Mon Sep 17 00:00:00 2001 From: rhailrake <49613070+rhailrake@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:43:19 +0600 Subject: [PATCH] [feat] roundid command --- .../Chat/Commands/RoundIdCommand.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Content.Server/Chat/Commands/RoundIdCommand.cs diff --git a/Content.Server/Chat/Commands/RoundIdCommand.cs b/Content.Server/Chat/Commands/RoundIdCommand.cs new file mode 100644 index 0000000000..d18d1d3ea8 --- /dev/null +++ b/Content.Server/Chat/Commands/RoundIdCommand.cs @@ -0,0 +1,21 @@ +using Content.Shared.Administration; +using Robust.Shared.Console; +using Content.Server.GameTicking; + +namespace Content.Server.Chat.Commands +{ + [AnyCommand] + internal sealed class RoundId : IConsoleCommand + { + public string Command => "roundid"; + public string Description => "Shows the id of the current round."; + public string Help => "Write roundid, output *Current round #roundId*"; + + private int _roundId => EntitySystem.Get().RoundId; + + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + shell.WriteLine($"Current round #{_roundId}"); + } + } +}