]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Cleanup warnings in `PolymorphSystem.Map` (#36869)
authorTayrtahn <tayrtahn@gmail.com>
Wed, 23 Apr 2025 22:25:13 +0000 (18:25 -0400)
committerGitHub <noreply@github.com>
Wed, 23 Apr 2025 22:25:13 +0000 (00:25 +0200)
Fix warnings in PolymorphSystem.Map

Content.Server/Polymorph/Systems/PolymorphSystem.Map.cs
Content.Server/Polymorph/Systems/PolymorphSystem.cs

index 120e04eeb08ecf31f45d895adcf3975d78dcbde2..1db624439ad160c781fd75803bbb7780392ca8ec 100644 (file)
@@ -31,8 +31,7 @@ public sealed partial class PolymorphSystem
         if (PausedMap != null && Exists(PausedMap))
             return;
 
-        var newmap = _mapManager.CreateMap();
-        _mapManager.SetMapPaused(newmap, true);
-        PausedMap = _mapManager.GetMapEntityId(newmap);
+        PausedMap = _map.CreateMap();
+        _map.SetPaused(PausedMap.Value, true);
     }
 }
index ddbde38a08c991eb42590cb4bfc8aa5499f17326..64dbcec54707ec52123876e938fbe99925dcfaf8 100644 (file)
@@ -29,7 +29,7 @@ namespace Content.Server.Polymorph.Systems;
 public sealed partial class PolymorphSystem : EntitySystem
 {
     [Dependency] private readonly IComponentFactory _compFact = default!;
-    [Dependency] private readonly IMapManager _mapManager = default!;
+    [Dependency] private readonly SharedMapSystem _map = default!;
     [Dependency] private readonly IPrototypeManager _proto = default!;
     [Dependency] private readonly IGameTiming _gameTiming = default!;
     [Dependency] private readonly ActionsSystem _actions = default!;