From 224566869d9f25211ace918e5ca9f1b368a0571f Mon Sep 17 00:00:00 2001 From: sTiKyt <35602029+sTiKyt@users.noreply.github.com> Date: Tue, 25 Jul 2023 15:08:25 +0000 Subject: [PATCH] Fixed mob corpses being unsellable --- Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs b/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs index 86103861511..5a8cbb37e58 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs @@ -287,9 +287,16 @@ private bool CanSell(EntityUid uid, TransformComponent xform) { if (_mobQuery.HasComponent(uid)) { - return false; + if (_mobQuery.GetComponent(uid).CurrentState == MobState.Alive) + { + return false; + } + + return true; } + + // Recursively check for mobs at any point. var children = xform.ChildEnumerator; while (children.MoveNext(out var child))