From: Tayrtahn Date: Tue, 25 Mar 2025 22:30:06 +0000 (-0400) Subject: Cleanup BiomeSystem.Commands (#36084) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=7270988961f6fdcdd3995a4c95d4446c257a17b5;p=space-station-14.git Cleanup BiomeSystem.Commands (#36084) * _mapManager.GetMapEntityId -> _mapSystem.GetMapOrInvalid * _mapManager.MapExists -> _mapSystem.MapExists * Unused using --- diff --git a/Content.Server/Parallax/BiomeSystem.Commands.cs b/Content.Server/Parallax/BiomeSystem.Commands.cs index 607345a00d..a915e17fcb 100644 --- a/Content.Server/Parallax/BiomeSystem.Commands.cs +++ b/Content.Server/Parallax/BiomeSystem.Commands.cs @@ -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(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(mapUid, out var biome)) + if (!_mapSystem.MapExists(mapId) || !TryComp(mapUid, out var biome)) { return; } @@ -105,7 +104,7 @@ public sealed partial class BiomeSystem { var mapId = new MapId(mapInt); - if (TryComp(_mapManager.GetMapEntityId(mapId), out var biome)) + if (TryComp(_mapSystem.GetMapOrInvalid(mapId), out var biome)) { var results = new List(); @@ -145,7 +144,7 @@ public sealed partial class BiomeSystem var mapId = new MapId(mapInt); - if (!_mapManager.MapExists(mapId) || !TryComp(_mapManager.GetMapEntityId(mapId), out var biome)) + if (!_mapSystem.MapExists(mapId) || !TryComp(_mapSystem.GetMapOrInvalid(mapId), out var biome)) { return; }