diff --git a/Content.Shared/Bed/Cryostorage/SharedCryostorageSystem.cs b/Content.Shared/Bed/Cryostorage/SharedCryostorageSystem.cs index f14dc21c48..c3fa21e293 100644 --- a/Content.Shared/Bed/Cryostorage/SharedCryostorageSystem.cs +++ b/Content.Shared/Bed/Cryostorage/SharedCryostorageSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.DragDrop; using Content.Shared.GameTicking; using Content.Shared.Mind; using Content.Shared.Mind.Components; +using Content.Shared.Mobs.Systems; using Robust.Shared.Configuration; using Robust.Shared.Containers; using Robust.Shared.Map; @@ -22,6 +23,7 @@ public abstract class SharedCryostorageSystem : EntitySystem [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] protected readonly SharedMindSystem Mind = default!; + [Dependency] private readonly MobStateSystem _mobState = default!; protected EntityUid? PausedMap { get; private set; } @@ -81,6 +83,12 @@ public abstract class SharedCryostorageSystem : EntitySystem if (args.Container.ID != comp.ContainerId) return; + if (_mobState.IsIncapacitated(args.EntityUid)) + { + args.Cancel(); + return; + } + if (!TryComp(args.EntityUid, out var mindContainer)) { args.Cancel();