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,17 +6,16 @@ using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Shuttles.Components;
using Content.Shared.Shuttles.Systems;
using Robust.Shared.Map;
using Robust.Shared.Physics.Components;
using Robust.Shared.Player;
using DroneConsoleComponent = Content.Server.Shuttles.DroneConsoleComponent;
using DependencyAttribute = Robust.Shared.IoC.DependencyAttribute;
using Robust.Shared.Map.Components;
namespace Content.Server.Physics.Controllers
{
public sealed class MoverController : SharedMoverController
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly ThrusterSystem _thruster = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
@@ -276,7 +275,7 @@ namespace Content.Server.Physics.Controllers
var gridId = xform.GridUid;
// This tries to see if the grid is a shuttle and if the console should work.
if (!_mapManager.TryGetGrid(gridId, out var _) ||
if (!TryComp<MapGridComponent>(gridId, out var _) ||
!shuttleQuery.TryGetComponent(gridId, out var shuttleComponent) ||
!shuttleComponent.Enabled)
continue;