mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 03:32:07 +01:00
prevent placing dead bodies in cryostorage (#26810)
This commit is contained in:
@@ -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<MindContainerComponent>(args.EntityUid, out var mindContainer))
|
||||
{
|
||||
args.Cancel();
|
||||
|
||||
Reference in New Issue
Block a user