Replace obsolete code in GasPortableSystem (#31407)

This commit is contained in:
Mervill
2024-08-24 18:55:02 -07:00
committed by GitHub
parent 1ef67e023b
commit 059c84c2cf

View 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))
{