]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Replace obsolete code in AnomalySystem.Generator.cs (#31718)
authorErrant <35878406+Errant-4@users.noreply.github.com>
Sun, 1 Sep 2024 15:20:54 +0000 (17:20 +0200)
committerGitHub <noreply@github.com>
Sun, 1 Sep 2024 15:20:54 +0000 (18:20 +0300)
* replace obsolete

* weh

Content.Server/Anomaly/AnomalySystem.Generator.cs

index 6eb84b944184ee455d6ffe28876559bb50afd076..1b88429204916c21324192e71e943bd49adfb596 100644 (file)
@@ -1,5 +1,4 @@
 using Content.Server.Anomaly.Components;
-using Content.Server.Power.Components;
 using Content.Server.Power.EntitySystems;
 using Content.Server.Station.Components;
 using Content.Shared.Anomaly;
@@ -11,10 +10,7 @@ using Content.Shared.Physics;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Physics;
 using Robust.Shared.Physics.Components;
-using Robust.Shared.Map;
-using System.Numerics;
 using Content.Shared.Power;
-using Robust.Server.GameObjects;
 
 namespace Content.Server.Anomaly;
 
@@ -115,7 +111,7 @@ public sealed partial class AnomalySystem
             var valid = true;
 
             // TODO: This should be using static lookup.
-            foreach (var ent in gridComp.GetAnchoredEntities(tile))
+            foreach (var ent in _mapSystem.GetAnchoredEntities(grid, gridComp, tile))
             {
                 if (!physQuery.TryGetComponent(ent, out var body))
                     continue;
@@ -131,10 +127,10 @@ public sealed partial class AnomalySystem
                 continue;
 
             var pos = _mapSystem.GridTileToLocal(grid, gridComp, tile);
-            var mapPos = pos.ToMap(EntityManager, _transform);
+            var mapPos = _transform.ToMapCoordinates(pos);
             // don't spawn in AntiAnomalyZones
             var antiAnomalyZonesQueue = AllEntityQuery<AntiAnomalyZoneComponent, TransformComponent>();
-            while (antiAnomalyZonesQueue.MoveNext(out var uid, out var zone, out var antiXform))
+            while (antiAnomalyZonesQueue.MoveNext(out _, out var zone, out var antiXform))
             {
                 if (antiXform.MapID != mapPos.MapId)
                     continue;