using Content.Shared.GameTicking; namespace Content.Server.Polymorph.Systems; public sealed partial class PolymorphSystem { public EntityUid? PausedMap { get; private set; } /// /// Used to subscribe to the round restart event /// private void InitializeMap() { SubscribeLocalEvent(OnRoundRestart); } private void OnRoundRestart(RoundRestartCleanupEvent _) { if (PausedMap == null || !Exists(PausedMap)) return; Del(PausedMap.Value); } /// /// Used internally to ensure a paused map that is /// stores polymorphed entities. /// private void EnsurePausedMap() { if (PausedMap != null && Exists(PausedMap)) return; var mapUid = _map.CreateMap(); _metaData.SetEntityName(mapUid, Loc.GetString("polymorph-paused-map-name")); _map.SetPaused(mapUid, true); PausedMap = mapUid; } }