Code Cleanup: Purge obsolete MapManager methods (#26279)
* GetGrid * GridExists * TryGetGrid
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user