diff --git a/Content.Shared/Morgue/EntityStorageLayingDownOverrideSystem.cs b/Content.Shared/Morgue/EntityStorageLayingDownOverrideSystem.cs index 9341168ba3e..6e00c5ef0e7 100644 --- a/Content.Shared/Morgue/EntityStorageLayingDownOverrideSystem.cs +++ b/Content.Shared/Morgue/EntityStorageLayingDownOverrideSystem.cs @@ -1,4 +1,6 @@ using Content.Shared.Body.Components; +using Content.Shared.Mobs.Components; +using Content.Shared.Mobs.Systems; using Content.Shared.Morgue.Components; using Content.Shared.Standing; using Content.Shared.Storage.Components; @@ -8,6 +10,7 @@ namespace Content.Shared.Morgue; public sealed class EntityStorageLayingDownOverrideSystem : EntitySystem { [Dependency] private readonly StandingStateSystem _standing = default!; + [Dependency] private readonly MobStateSystem _mobState = default!; public override void Initialize() { @@ -20,7 +23,7 @@ private void OnBeforeClose(EntityUid uid, EntityStorageLayingDownOverrideCompone { foreach (var ent in args.Contents) { - if (HasComp(ent) && !_standing.IsDown(ent)) + if (HasComp(ent) && (!_standing.IsDown(ent) || !_mobState.IsDead(ent))) args.Contents.Remove(ent); } } diff --git a/Resources/Prototypes/Entities/Structures/Storage/morgue.yml b/Resources/Prototypes/Entities/Structures/Storage/morgue.yml index 496ea416119..6071476d5f7 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/morgue.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/morgue.yml @@ -44,7 +44,6 @@ path: /Audio/Items/deconstruct.ogg openSound: path: /Audio/Items/deconstruct.ogg - - type: EntityStorageLayingDownOverride - type: Morgue - type: ContainerContainer containers: @@ -121,7 +120,6 @@ path: /Audio/Items/deconstruct.ogg openSound: path: /Audio/Items/deconstruct.ogg - - type: EntityStorageLayingDownOverride - type: Crematorium - type: ContainerContainer containers: