Cleanup BiomeSystem.Commands (#36084)

* _mapManager.GetMapEntityId -> _mapSystem.GetMapOrInvalid

* _mapManager.MapExists -> _mapSystem.MapExists

* Unused using
This commit is contained in:
Tayrtahn 2025-03-25 18:30:06 -04:00 committed by deltanedas
parent 0312796910
commit b1c71c6c2f
1 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,3 @@
using System.Linq;
using Content.Server.Administration;
using Content.Shared.Administration;
using Content.Shared.Parallax.Biomes;
@ -29,9 +28,9 @@ public sealed partial class BiomeSystem
int.TryParse(args[0], out var mapInt);
var mapId = new MapId(mapInt);
var mapUid = _mapManager.GetMapEntityId(mapId);
var mapUid = _mapSystem.GetMapOrInvalid(mapId);
if (_mapManager.MapExists(mapId) ||
if (_mapSystem.MapExists(mapId) ||
!TryComp<BiomeComponent>(mapUid, out var biome))
{
return;
@ -64,9 +63,9 @@ public sealed partial class BiomeSystem
}
var mapId = new MapId(mapInt);
var mapUid = _mapManager.GetMapEntityId(mapId);
var mapUid = _mapSystem.GetMapOrInvalid(mapId);
if (!_mapManager.MapExists(mapId) || !TryComp<BiomeComponent>(mapUid, out var biome))
if (!_mapSystem.MapExists(mapId) || !TryComp<BiomeComponent>(mapUid, out var biome))
{
return;
}
@ -105,7 +104,7 @@ public sealed partial class BiomeSystem
{
var mapId = new MapId(mapInt);
if (TryComp<BiomeComponent>(_mapManager.GetMapEntityId(mapId), out var biome))
if (TryComp<BiomeComponent>(_mapSystem.GetMapOrInvalid(mapId), out var biome))
{
var results = new List<string>();
@ -145,7 +144,7 @@ public sealed partial class BiomeSystem
var mapId = new MapId(mapInt);
if (!_mapManager.MapExists(mapId) || !TryComp<BiomeComponent>(_mapManager.GetMapEntityId(mapId), out var biome))
if (!_mapSystem.MapExists(mapId) || !TryComp<BiomeComponent>(_mapSystem.GetMapOrInvalid(mapId), out var biome))
{
return;
}