From 4dfd3e5740d316d1c37d38623b8266333bef0945 Mon Sep 17 00:00:00 2001 From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Sun, 2 Mar 2025 11:45:54 -0800 Subject: [PATCH] [HOTFIX] - Players with unknown playtimes now are tagged as new players (#35564) * Players with unknown playtimes now are tagged as new players * Fix * I'm silly it was in the same file * Cavar update --- .../Administration/UI/Bwoink/BwoinkControl.xaml.cs | 5 ++++- .../Administration/UI/Bwoink/BwoinkWindow.xaml.cs | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs index 3e05018c10..932b08e1a6 100644 --- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs +++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs @@ -36,6 +36,9 @@ namespace Content.Client.Administration.UI.Bwoink RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); + var newPlayerThreshold = 0; + _cfg.OnValueChanged(CCVars.NewPlayerThreshold, (val) => { newPlayerThreshold = val; }, true); + var uiController = _ui.GetUIController(); if (uiController.UIHelper is not AdminAHelpUIHandler helper) return; @@ -76,7 +79,7 @@ namespace Content.Client.Administration.UI.Bwoink if (info.Antag && info.ActiveThisRound) sb.Append(new Rune(0x1F5E1)); // 🗡 - if (info.OverallPlaytime <= TimeSpan.FromMinutes(_cfg.GetCVar(CCVars.NewPlayerThreshold))) + if (newPlayerThreshold != 0 && (info.OverallPlaytime == null || info.OverallPlaytime <= TimeSpan.FromMinutes(newPlayerThreshold))) sb.Append(new Rune(0x23F2)); // ⏲ sb.AppendFormat("\"{0}\"", text); diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs b/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs index e8653843c7..e6cd4942a6 100644 --- a/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs +++ b/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs @@ -22,12 +22,9 @@ namespace Content.Client.Administration.UI.Bwoink return; } - Title = $"{sel.CharacterName} / {sel.Username}"; + Title = $"{sel.CharacterName} / {sel.Username} | {Loc.GetString("generic-playtime-title")}: "; - if (sel.OverallPlaytime != null) - { - Title += $" | {Loc.GetString("generic-playtime-title")}: {sel.PlaytimeString}"; - } + Title += sel.OverallPlaytime != null ? sel.PlaytimeString : Loc.GetString("generic-unknown-title"); }; OnOpen += () => -- 2.51.2