Fix obsolete MapGridComponent warning in SpawnAfterInteractSystem (#37911)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user