From f81d216630efa119b3309c1626167a119b709d55 Mon Sep 17 00:00:00 2001 From: TemporalOroboros Date: Wed, 28 May 2025 15:34:40 -0700 Subject: [PATCH] Fix obsolete MapGridComponent warning in SpawnAfterInteractSystem (#37911) --- .../Engineering/EntitySystems/SpawnAfterInteractSystem.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs b/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs index 2e4cbee10c..94994a38b8 100644 --- a/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs +++ b/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs @@ -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(_transform.GetGrid(args.ClickLocation), out var grid)) + + var gridUid = _transform.GetGrid(args.ClickLocation); + if (!TryComp(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() -- 2.51.2