using System.Text.Json.Nodes;
using Content.Shared.CCVar;
+using Content.Shared.GameTicking;
using Robust.Server.ServerStatus;
using Robust.Shared.Configuration;
/// For access to CVars in status responses.
/// </summary>
[Dependency] private readonly IConfigurationManager _cfg = default!;
-
+ /// <summary>
+ /// For access to the round ID in status responses.
+ /// </summary>
+ [Dependency] private readonly SharedGameTicker _gameTicker = default!;
+
private void InitializeStatusShell()
{
IoCManager.Resolve<IStatusHost>().OnStatusRequest += GetStatusResponse;
{
jObject["name"] = _baseServer.ServerName;
jObject["map"] = _gameMapManager.GetSelectedMap()?.MapName;
+ jObject["round_id"] = _gameTicker.RoundId;
jObject["players"] = _playerManager.PlayerCount;
jObject["soft_max_players"] = _cfg.GetCVar(CCVars.SoftMaxPlayers);
jObject["run_level"] = (int) _runLevel;