Skip to content

Commit

Permalink
Yooooo!
Browse files Browse the repository at this point in the history
Maiden by Remuchi
  • Loading branch information
RedBurningPhoenix committed Dec 15, 2024
1 parent cdbe0e5 commit e2432d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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()
{
Expand All @@ -20,7 +23,7 @@ private void OnBeforeClose(EntityUid uid, EntityStorageLayingDownOverrideCompone
{
foreach (var ent in args.Contents)
{
if (HasComp<BodyComponent>(ent) && !_standing.IsDown(ent))
if (HasComp<BodyComponent>(ent) && (!_standing.IsDown(ent) || !_mobState.IsDead(ent)))
args.Contents.Remove(ent);
}
}
Expand Down
2 changes: 0 additions & 2 deletions Resources/Prototypes/Entities/Structures/Storage/morgue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
path: /Audio/Items/deconstruct.ogg
openSound:
path: /Audio/Items/deconstruct.ogg
- type: EntityStorageLayingDownOverride
- type: Morgue
- type: ContainerContainer
containers:
Expand Down Expand Up @@ -121,7 +120,6 @@
path: /Audio/Items/deconstruct.ogg
openSound:
path: /Audio/Items/deconstruct.ogg
- type: EntityStorageLayingDownOverride
- type: Crematorium
- type: ContainerContainer
containers:
Expand Down

0 comments on commit e2432d6

Please sign in to comment.