From: TemporalOroboros Date: Wed, 28 May 2025 22:34:40 +0000 (-0700) Subject: Fix obsolete MapGridComponent warning in SpawnAfterInteractSystem (#37911) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=f81d216630efa119b3309c1626167a119b709d55;p=space-station-14.git Fix obsolete MapGridComponent warning in SpawnAfterInteractSystem (#37911) --- 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()