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

@@ -3,7 +3,7 @@ using Content.Server.Atmos.EntitySystems;
using Content.Shared.Administration;
using Content.Shared.Atmos;
using Robust.Shared.Console;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
namespace Content.Server.Atmos.Commands
{
@@ -11,7 +11,6 @@ namespace Content.Server.Atmos.Commands
public sealed class DeleteGasCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
public string Command => "deletegas";
public string Description => "Removes all gases from a grid, or just of one type if specified.";
@@ -119,7 +118,7 @@ namespace Content.Server.Atmos.Commands
return;
}
if (!_mapManager.TryGetGrid(gridId, out _))
if (!_entManager.TryGetComponent<MapGridComponent>(gridId, out _))
{
shell.WriteLine($"No grid exists with id {gridId}");
return;