using Content.Client.Administration.UI.CustomControls;
using Content.Client.UserInterface.Systems.Bwoink;
using Content.Shared.Administration;
+using Content.Shared.CCVar;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Network;
using Robust.Shared.Utility;
+using Robust.Shared.Timing;
+using Robust.Shared.Configuration;
namespace Content.Client.Administration.UI.Bwoink
{
[Dependency] private readonly IClientAdminManager _adminManager = default!;
[Dependency] private readonly IClientConsoleHost _console = default!;
[Dependency] private readonly IUserInterfaceManager _ui = default!;
+ [Dependency] private readonly IConfigurationManager _cfg = default!;
public AdminAHelpUIHandler AHelpHelper = default!;
private PlayerInfo? _currentPlayer;
if (info.Antag && info.ActiveThisRound)
sb.Append(new Rune(0x1F5E1)); // 🗡
+ if (info.OverallPlaytime <= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.NewPlayerThreshold)))
+ sb.Append(new Rune(0x23F2)); // ⏲
+
sb.AppendFormat("\"{0}\"", text);
return sb.ToString();
if (pl.Antag)
sb.Append(new Rune(0x1F5E1)); // 🗡
+ if (pl.OverallPlaytime <= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.NewPlayerThreshold)))
+ sb.Append(new Rune(0x23F2)); // ⏲
+
sb.AppendFormat("\"{0}\"", pl.CharacterName);
if (pl.IdentityName != pl.CharacterName && pl.IdentityName != string.Empty)
/// </summary>
public static readonly CVarDef<string> AdminAhelpOverrideClientName =
CVarDef.Create("admin.override_adminname_in_client_ahelp", string.Empty, CVar.SERVERONLY);
+
+ /// <summary>
+ /// The threshold of minutes to appear as a "new player" in the ahelp menu
+ /// If 0, appearing as a new player is disabled.
+ /// </summary>
+ public static readonly CVarDef<int> NewPlayerThreshold =
+ CVarDef.Create("admin.new_player_threshold", 0, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER);
+
/*
* Explosions
*/