]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix obsolete MapGridComponent warning in SpawnAfterInteractSystem (#37911)
authorTemporalOroboros <TemporalOroboros@gmail.com>
Wed, 28 May 2025 22:34:40 +0000 (15:34 -0700)
committerGitHub <noreply@github.com>
Wed, 28 May 2025 22:34:40 +0000 (00:34 +0200)
Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs

index 2e4cbee10c172db88bf362e7748b82b9f2b4afbd..94994a38b81bcb71a6e5a7b28d49b8be31bd75fd 100644 (file)
@@ -18,6 +18,7 @@ namespace Content.Server.Engineering.EntitySystems
         [Dependency] private readonly StackSystem _stackSystem = default!;
         [Dependency] private readonly TurfSystem _turfSystem = default!;
         [Dependency] private readonly SharedTransformSystem _transform = default!;
+        [Dependency] private readonly SharedMapSystem _maps = default!;
 
         public override void Initialize()
         {
@@ -32,9 +33,11 @@ namespace Content.Server.Engineering.EntitySystems
                 return;
             if (string.IsNullOrEmpty(component.Prototype))
                 return;
-            if (!TryComp<MapGridComponent>(_transform.GetGrid(args.ClickLocation), out var grid))
+
+            var gridUid = _transform.GetGrid(args.ClickLocation);
+            if (!TryComp<MapGridComponent>(gridUid, out var grid))
                 return;
-            if (!grid.TryGetTileRef(args.ClickLocation, out var tileRef))
+            if (!_maps.TryGetTileRef(gridUid.Value, grid, args.ClickLocation, out var tileRef))
                 return;
 
             bool IsTileClear()