From 02814e1e8d1b883cab4fb228506aa32fe78dbea4 Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Wed, 23 Apr 2025 18:25:13 -0400 Subject: [PATCH] Cleanup warnings in `PolymorphSystem.Map` (#36869) Fix warnings in PolymorphSystem.Map --- Content.Server/Polymorph/Systems/PolymorphSystem.Map.cs | 5 ++--- Content.Server/Polymorph/Systems/PolymorphSystem.cs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Content.Server/Polymorph/Systems/PolymorphSystem.Map.cs b/Content.Server/Polymorph/Systems/PolymorphSystem.Map.cs index 120e04eeb0..1db624439a 100644 --- a/Content.Server/Polymorph/Systems/PolymorphSystem.Map.cs +++ b/Content.Server/Polymorph/Systems/PolymorphSystem.Map.cs @@ -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); } } diff --git a/Content.Server/Polymorph/Systems/PolymorphSystem.cs b/Content.Server/Polymorph/Systems/PolymorphSystem.cs index ddbde38a08..64dbcec547 100644 --- a/Content.Server/Polymorph/Systems/PolymorphSystem.cs +++ b/Content.Server/Polymorph/Systems/PolymorphSystem.cs @@ -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!; -- 2.51.2