Cleanup BiomeSystem.Commands (#36084)
* _mapManager.GetMapEntityId -> _mapSystem.GetMapOrInvalid * _mapManager.MapExists -> _mapSystem.MapExists * Unused using
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
using System.Linq;
|
|
||||||
using Content.Server.Administration;
|
using Content.Server.Administration;
|
||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Content.Shared.Parallax.Biomes;
|
using Content.Shared.Parallax.Biomes;
|
||||||
@@ -29,9 +28,9 @@ public sealed partial class BiomeSystem
|
|||||||
|
|
||||||
int.TryParse(args[0], out var mapInt);
|
int.TryParse(args[0], out var mapInt);
|
||||||
var mapId = new MapId(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))
|
!TryComp<BiomeComponent>(mapUid, out var biome))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -64,9 +63,9 @@ public sealed partial class BiomeSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
var mapId = new MapId(mapInt);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@@ -105,7 +104,7 @@ public sealed partial class BiomeSystem
|
|||||||
{
|
{
|
||||||
var mapId = new MapId(mapInt);
|
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>();
|
var results = new List<string>();
|
||||||
|
|
||||||
@@ -145,7 +144,7 @@ public sealed partial class BiomeSystem
|
|||||||
|
|
||||||
var mapId = new MapId(mapInt);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user