[PRIORITY NEGATIVE ONE/STABLE HOTFIX] ADMIN NOTES CANNOT BE ACCESSED (#40863)

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Fix logger obsolete warnings (#40553)"
This commit is contained in:
Princess Cheeseballs
2025-10-12 14:52:26 -07:00
committed by GitHub
parent 9877b77fff
commit e917c8e067
10 changed files with 22 additions and 63 deletions

View File

@@ -14,18 +14,12 @@ namespace Content.Client.UserInterface.Systems.Alerts.Widgets;
[GenerateTypedNameReferences]
public sealed partial class AlertsUI : UIWidget
{
[Dependency] private readonly ILogManager _logManager = default!;
private readonly ISawmill _sawmill = default!;
// also known as Control.Children?
private readonly Dictionary<AlertKey, AlertControl> _alertControls = new();
public AlertsUI()
{
RobustXamlLoader.Load(this);
_sawmill = _logManager.GetSawmill("alertsui");
}
public void SyncControls(AlertsSystem alertsSystem,
@@ -84,15 +78,15 @@ public sealed partial class AlertsUI : UIWidget
{
if (!alertKey.AlertType.HasValue)
{
_sawmill.Warning("found alertkey without alerttype," +
" alert keys should never be stored without an alerttype set: {0}", alertKey);
Logger.WarningS("alert", "found alertkey without alerttype," +
" alert keys should never be stored without an alerttype set: {0}", alertKey);
continue;
}
var alertType = alertKey.AlertType.Value;
if (!alertsSystem.TryGet(alertType, out var newAlert))
{
_sawmill.Error("Unrecognized alertType {0}", alertType);
Logger.ErrorS("alert", "Unrecognized alertType {0}", alertType);
continue;
}