Cleanup warnings in `CableVisSystem` (#37738)

Cleanup 2 warnings in CableVisSystem
This commit is contained in:
Tayrtahn 2025-05-22 23:22:32 -04:00 committed by Quanteey
parent a44ae331dd
commit 6430f66413
1 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ namespace Content.Server.Power.EntitySystems
{
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
[Dependency] private readonly SharedMapSystem _map = default!;
public override void Initialize()
{
@ -31,7 +32,7 @@ namespace Content.Server.Power.EntitySystems
return;
var mask = WireVisDirFlags.None;
var tile = grid.TileIndicesFor(transform.Coordinates);
var tile = _map.TileIndicesFor((transform.GridUid.Value, grid), transform.Coordinates);
foreach (var reachable in node.ReachableNodes)
{
@ -39,7 +40,7 @@ namespace Content.Server.Power.EntitySystems
continue;
var otherTransform = Transform(reachable.Owner);
var otherTile = grid.TileIndicesFor(otherTransform.Coordinates);
var otherTile = _map.TileIndicesFor((transform.GridUid.Value, grid), otherTransform.Coordinates);
var diff = otherTile - tile;
mask |= diff switch