Fix humanoid appearances for placement manager (#18291)

This commit is contained in:
metalgearsloth
2023-08-05 14:25:47 +10:00
committed by GitHub
parent d58786faf4
commit ead47c541d
16 changed files with 313 additions and 295 deletions

View File

@@ -181,22 +181,6 @@ public sealed class BodySystem : SharedBodySystem
return true;
}
protected override void InitBody(BodyComponent body, BodyPrototype prototype)
{
var root = prototype.Slots[prototype.Root];
Containers.EnsureContainer<Container>(body.Owner, BodyContainerId);
if (root.Part == null)
return;
var bodyId = Spawn(root.Part, body.Owner.ToCoordinates());
var partComponent = Comp<BodyPartComponent>(bodyId);
var slot = new BodyPartSlot(root.Part, body.Owner, partComponent.PartType);
body.Root = slot;
partComponent.Body = bodyId;
AttachPart(bodyId, slot, partComponent);
InitPart(partComponent, prototype, prototype.Root);
}
public override HashSet<EntityUid> GibBody(EntityUid? bodyId, bool gibOrgans = false, BodyComponent? body = null, bool deleteItems = false)
{
if (bodyId == null || !Resolve(bodyId.Value, ref body, false))