]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Replace obsolete code in GasPortableSystem (#31407)
authorMervill <mervills.email@gmail.com>
Sun, 25 Aug 2024 01:55:02 +0000 (18:55 -0700)
committerGitHub <noreply@github.com>
Sun, 25 Aug 2024 01:55:02 +0000 (11:55 +1000)
Content.Server/Atmos/Piping/Unary/EntitySystems/GasPortableSystem.cs

index 7cb8102a38849d9ca5292fce11eeec858385d0ff..b6271c22d4c258f3eb27040639f50895a5d17cda 100644 (file)
@@ -15,6 +15,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
     [UsedImplicitly]
     public sealed class GasPortableSystem : EntitySystem
     {
+        [Dependency] private readonly SharedMapSystem _mapSystem = default!;
         [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
         [Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
 
@@ -33,7 +34,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
                 return;
 
             // If we can't find any ports, cancel the anchoring.
-            if(!FindGasPortIn(transform.GridUid, transform.Coordinates, out _))
+            if (!FindGasPortIn(transform.GridUid, transform.Coordinates, out _))
                 args.Cancel();
         }
 
@@ -57,7 +58,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
             if (!TryComp<MapGridComponent>(gridId, out var grid))
                 return false;
 
-            foreach (var entityUid in grid.GetLocal(coordinates))
+            foreach (var entityUid in _mapSystem.GetLocal(gridId.Value, grid, coordinates))
             {
                 if (EntityManager.TryGetComponent(entityUid, out port))
                 {