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