]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Resolve a warning in SharedAnomalySystem and quell some linter whining. (#36939)
authorKyle Tyo <36606155+VerinSenpai@users.noreply.github.com>
Sat, 26 Apr 2025 21:40:44 +0000 (17:40 -0400)
committerGitHub <noreply@github.com>
Sat, 26 Apr 2025 21:40:44 +0000 (17:40 -0400)
* resolve a warning and deal with some linter whining.

* Update Content.Shared/Anomaly/SharedAnomalySystem.cs

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Content.Shared/Anomaly/SharedAnomalySystem.cs

index 61b8cc7f90689f892353f91cd254747b0353eca3..666d98bfc6b4dfa8b92703844cc6ab9e6843147a 100644 (file)
@@ -187,7 +187,8 @@ public abstract class SharedAnomalySystem : EntitySystem
             // 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,
+            AdminLog.Add(LogType.Anomaly,
+                supercritical ? LogImpact.High : LogImpact.Low,
                 $"Anomaly {ToPrettyString(uid)} {(supercritical ? "went supercritical" : "decayed")}.");
         }
 
@@ -402,7 +403,7 @@ public abstract class SharedAnomalySystem : EntitySystem
             if (!settings.CanSpawnOnEntities)
             {
                 var valid = true;
-                foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices))
+                foreach (var ent in _map.GetAnchoredEntities(xform.GridUid.Value, grid, tileref.GridIndices))
                 {
                     if (!physQuery.TryGetComponent(ent, out var body))
                         continue;
@@ -429,7 +430,7 @@ public abstract class SharedAnomalySystem : EntitySystem
 }
 
 [DataRecord]
-public partial record struct AnomalySpawnSettings()
+public record struct AnomalySpawnSettings()
 {
     /// <summary>
     /// should entities block spawning?
@@ -483,4 +484,4 @@ public partial record struct AnomalySpawnSettings()
     public bool SpawnOnSeverityChanged { get; set; } = false;
 }
 
-public sealed partial class ActionAnomalyPulseEvent : InstantActionEvent { }
+public sealed partial class ActionAnomalyPulseEvent : InstantActionEvent;