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.GameTicking;
|
||||||
using Content.Shared.Mind;
|
using Content.Shared.Mind;
|
||||||
using Content.Shared.Mind.Components;
|
using Content.Shared.Mind.Components;
|
||||||
|
using Content.Shared.Mobs.Systems;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
@@ -22,6 +23,7 @@ public abstract class SharedCryostorageSystem : EntitySystem
|
|||||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||||
[Dependency] protected readonly SharedMindSystem Mind = default!;
|
[Dependency] protected readonly SharedMindSystem Mind = default!;
|
||||||
|
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||||
|
|
||||||
protected EntityUid? PausedMap { get; private set; }
|
protected EntityUid? PausedMap { get; private set; }
|
||||||
|
|
||||||
@@ -81,6 +83,12 @@ public abstract class SharedCryostorageSystem : EntitySystem
|
|||||||
if (args.Container.ID != comp.ContainerId)
|
if (args.Container.ID != comp.ContainerId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (_mobState.IsIncapacitated(args.EntityUid))
|
||||||
|
{
|
||||||
|
args.Cancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!TryComp<MindContainerComponent>(args.EntityUid, out var mindContainer))
|
if (!TryComp<MindContainerComponent>(args.EntityUid, out var mindContainer))
|
||||||
{
|
{
|
||||||
args.Cancel();
|
args.Cancel();
|
||||||
|
|||||||
Reference in New Issue
Block a user