]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Cleanup warnings in `CableVisSystem` (#37738)
authorTayrtahn <tayrtahn@gmail.com>
Fri, 23 May 2025 03:22:32 +0000 (23:22 -0400)
committerGitHub <noreply@github.com>
Fri, 23 May 2025 03:22:32 +0000 (05:22 +0200)
Cleanup 2 warnings in CableVisSystem

Content.Server/Power/EntitySystems/CableVisSystem.cs

index 1a68e87ad611de342ebfc1629fd012f3805bbfe2..174908137d346bbde3e22dcd81007227ac741136 100644 (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