Fix misc bugs (#15314)

This commit is contained in:
Leon Friedrich
2023-04-12 12:18:30 +12:00
committed by GitHub
parent d068c4f36b
commit 21378f6e41
9 changed files with 31 additions and 19 deletions

View File

@@ -98,11 +98,13 @@ public sealed class BodySystem : SharedBodySystem
public override bool DropPart(EntityUid? partId, BodyPartComponent? part = null)
{
var oldBody = CompOrNull<BodyPartComponent>(partId)?.Body;
if (partId == null || !Resolve(partId.Value, ref part))
return false;
if (!base.DropPart(partId, part))
return false;
var oldBody = part.Body;
if (oldBody == null || !TryComp<HumanoidAppearanceComponent>(oldBody, out var humanoid))
return true;