]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Cleanup BiomeSystem.Commands (#36084)
authorTayrtahn <tayrtahn@gmail.com>
Tue, 25 Mar 2025 22:30:06 +0000 (18:30 -0400)
committerGitHub <noreply@github.com>
Tue, 25 Mar 2025 22:30:06 +0000 (23:30 +0100)
* _mapManager.GetMapEntityId -> _mapSystem.GetMapOrInvalid

* _mapManager.MapExists -> _mapSystem.MapExists

* Unused using

Content.Server/Parallax/BiomeSystem.Commands.cs

index 607345a00d3d24d515cecbf30f26f22407e148f4..a915e17fcb65c8eb1de1c030ca8083a080f20d60 100644 (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;
         }