diff --git a/Content.Shared/Alert/AlertsSystem.cs b/Content.Shared/Alert/AlertsSystem.cs index d8737a717a..5b888e30c4 100644 --- a/Content.Shared/Alert/AlertsSystem.cs +++ b/Content.Shared/Alert/AlertsSystem.cs @@ -80,6 +80,10 @@ public abstract class AlertsSystem : EntitySystem /// if true, the cooldown will be visibly shown over the alert icon public void ShowAlert(EntityUid euid, AlertType alertType, short? severity = null, (TimeSpan, TimeSpan)? cooldown = null, bool autoRemove = false, bool showCooldown = true ) { + // This should be handled as part of networking. + if (_timing.ApplyingState) + return; + if (!TryComp(euid, out AlertsComponent? alertsComponent)) return; @@ -148,6 +152,9 @@ public abstract class AlertsSystem : EntitySystem /// public void ClearAlert(EntityUid euid, AlertType alertType) { + if (_timing.ApplyingState) + return; + if (!EntityManager.TryGetComponent(euid, out AlertsComponent? alertsComponent)) return;