From 059c84c2cf2cea141af67c9e347dcaadecfbc2b5 Mon Sep 17 00:00:00 2001 From: Mervill Date: Sat, 24 Aug 2024 18:55:02 -0700 Subject: [PATCH] Replace obsolete code in GasPortableSystem (#31407) --- .../Atmos/Piping/Unary/EntitySystems/GasPortableSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasPortableSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasPortableSystem.cs index 7cb8102a38..b6271c22d4 100644 --- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasPortableSystem.cs +++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasPortableSystem.cs @@ -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(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)) { -- 2.51.2