From: Tayrtahn Date: Thu, 22 May 2025 01:06:06 +0000 (-0400) Subject: Cleanup warnings in `AtmosPipeAppearanceSystem` (#37706) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=6f89c2c455e23f78a6159252f8e06031d8600b44;p=space-station-14.git Cleanup warnings in `AtmosPipeAppearanceSystem` (#37706) * Cleanup 2 warnings in AtmosPipeAppearanceSystem * Let's use the Entity version * todo comment --- diff --git a/Content.Server/Atmos/Piping/EntitySystems/AtmosPipeAppearanceSystem.cs b/Content.Server/Atmos/Piping/EntitySystems/AtmosPipeAppearanceSystem.cs index 53cc35463c..3e14fea2d8 100644 --- a/Content.Server/Atmos/Piping/EntitySystems/AtmosPipeAppearanceSystem.cs +++ b/Content.Server/Atmos/Piping/EntitySystems/AtmosPipeAppearanceSystem.cs @@ -11,6 +11,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems; public sealed class AtmosPipeAppearanceSystem : EntitySystem { [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + [Dependency] private readonly SharedMapSystem _map = default!; public override void Initialize() { @@ -55,10 +56,11 @@ public sealed class AtmosPipeAppearanceSystem : EntitySystem // find the cardinal directions of any connected entities var netConnectedDirections = PipeDirection.None; - var tile = grid.TileIndicesFor(xform.Coordinates); + var tile = _map.TileIndicesFor((xform.GridUid.Value, grid), xform.Coordinates); foreach (var neighbour in connected) { - var otherTile = grid.TileIndicesFor(Transform(neighbour).Coordinates); + // TODO z-levels, pipes across grids - we shouldn't assume that the neighboring tile's transform is on the same grid + var otherTile = _map.TileIndicesFor((xform.GridUid.Value, grid), Transform(neighbour).Coordinates); netConnectedDirections |= (otherTile - tile) switch {