Code Cleanup: Purge obsolete MapManager methods (#26279)
* GetGrid * GridExists * TryGetGrid
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Server.Administration;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server.Decals;
|
||||
|
||||
@@ -43,7 +44,7 @@ Possible modes are:\n
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_mapManager.GridExists(gridId))
|
||||
if (!_entManager.HasComponent<MapGridComponent>(gridId))
|
||||
{
|
||||
shell.WriteError($"No grid with gridId {gridId} exists.");
|
||||
return;
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Server.Administration;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using SQLitePCL;
|
||||
|
||||
namespace Content.Server.Decals.Commands
|
||||
@@ -31,7 +32,7 @@ namespace Content.Server.Decals.Commands
|
||||
|
||||
if (!NetEntity.TryParse(args[1], out var rawGridIdNet) ||
|
||||
!_entManager.TryGetEntity(rawGridIdNet, out var rawGridId) ||
|
||||
!_mapManager.GridExists(rawGridId))
|
||||
!_entManager.HasComponent<MapGridComponent>(rawGridId))
|
||||
{
|
||||
shell.WriteError("Failed parsing gridId.");
|
||||
return;
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace Content.Server.Decals
|
||||
return;
|
||||
|
||||
// Transfer decals over to the new grid.
|
||||
var enumerator = MapManager.GetGrid(ev.Grid).GetAllTilesEnumerator();
|
||||
var enumerator = Comp<MapGridComponent>(ev.Grid).GetAllTilesEnumerator();
|
||||
|
||||
var oldChunkCollection = oldComp.ChunkCollection.ChunkCollection;
|
||||
var chunkCollection = newComp.ChunkCollection.ChunkCollection;
|
||||
|
||||
Reference in New Issue
Block a user