diff --git a/Content.Shared/Anomaly/SharedAnomalySystem.cs b/Content.Shared/Anomaly/SharedAnomalySystem.cs index 3f8da9e3c8..0d7c926f76 100644 --- a/Content.Shared/Anomaly/SharedAnomalySystem.cs +++ b/Content.Shared/Anomaly/SharedAnomalySystem.cs @@ -163,7 +163,7 @@ public abstract class SharedAnomalySystem : EntitySystem var ev = new AnomalySupercriticalEvent(uid, powerMod); RaiseLocalEvent(uid, ref ev, true); - EndAnomaly(uid, component, true); + EndAnomaly(uid, component, true, logged: true); } /// @@ -173,13 +173,17 @@ public abstract class SharedAnomalySystem : EntitySystem /// /// Whether or not the anomaly ended via supercritical event /// Create anomaly cores based on the result of completing an anomaly? - public void EndAnomaly(EntityUid uid, AnomalyComponent? component = null, bool supercritical = false, bool spawnCore = true) + /// Whether or not the anomaly decaying/going supercritical is logged + public void EndAnomaly(EntityUid uid, AnomalyComponent? component = null, bool supercritical = false, bool spawnCore = true, bool logged = false) { - // Logging before resolve, in case the anomaly has deleted itself. - if (_net.IsServer) - Log.Info($"Ending anomaly. Entity: {ToPrettyString(uid)}"); - AdminLog.Add(LogType.Anomaly, supercritical ? LogImpact.High : LogImpact.Low, - $"Anomaly {ToPrettyString(uid)} {(supercritical ? "went supercritical" : "decayed")}."); + if (logged) + { + // Logging before resolve, in case the anomaly has deleted itself. + if (_net.IsServer) + Log.Info($"Ending anomaly. Entity: {ToPrettyString(uid)}"); + AdminLog.Add(LogType.Anomaly, supercritical ? LogImpact.High : LogImpact.Low, + $"Anomaly {ToPrettyString(uid)} {(supercritical ? "went supercritical" : "decayed")}."); + } if (!Resolve(uid, ref component)) return; @@ -260,7 +264,7 @@ public abstract class SharedAnomalySystem : EntitySystem if (newVal < 0) { - EndAnomaly(uid, component); + EndAnomaly(uid, component, logged: true); return; }