Code Cleanup: Purge obsolete MapManager methods (#26279)

* GetGrid

* GridExists

* TryGetGrid
This commit is contained in:
Tayrtahn
2024-03-22 03:08:40 -04:00
committed by GitHub
parent 2ed0e58069
commit ae3d745430
49 changed files with 97 additions and 122 deletions

View File

@@ -6,14 +6,13 @@ using Content.Shared.Interaction;
using Content.Shared.Maps;
using Content.Shared.Stacks;
using JetBrains.Annotations;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
namespace Content.Server.Engineering.EntitySystems
{
[UsedImplicitly]
public sealed class SpawnAfterInteractSystem : EntitySystem
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly StackSystem _stackSystem = default!;
@@ -30,7 +29,7 @@ namespace Content.Server.Engineering.EntitySystems
return;
if (string.IsNullOrEmpty(component.Prototype))
return;
if (!_mapManager.TryGetGrid(args.ClickLocation.GetGridUid(EntityManager), out var grid))
if (!TryComp<MapGridComponent>(args.ClickLocation.GetGridUid(EntityManager), out var grid))
return;
if (!grid.TryGetTileRef(args.ClickLocation, out var tileRef))
return;