Merge branch 'master' into offmed-staging

This commit is contained in:
Janet Blackquill
2025-10-07 23:41:47 -04:00
352 changed files with 2698 additions and 1901 deletions

View File

@@ -14,12 +14,18 @@ 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,
@@ -78,15 +84,15 @@ public sealed partial class AlertsUI : UIWidget
{
if (!alertKey.AlertType.HasValue)
{
Logger.WarningS("alert", "found alertkey without alerttype," +
" alert keys should never be stored without an alerttype set: {0}", alertKey);
_sawmill.Warning("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))
{
Logger.ErrorS("alert", "Unrecognized alertType {0}", alertType);
_sawmill.Error("Unrecognized alertType {0}", alertType);
continue;
}