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 GitHub
parent 947e20eeb7
commit 8565966b53

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