ECS and cleanup body system, merge body templates and presets into body prototypes (#11991)

Co-authored-by: Jezithyr <Jezithyr@gmail.com>
This commit is contained in:
DrSmugleaf
2022-10-23 00:46:28 +02:00
committed by GitHub
parent 9a38736c3c
commit f323fb7644
140 changed files with 2478 additions and 2571 deletions

View File

@@ -1,4 +1,4 @@
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Shared.Administration;
using Robust.Shared.Console;
@@ -26,16 +26,11 @@ namespace Content.Server.Administration.Commands
}
var entityManager = IoCManager.Resolve<IEntityManager>();
var bodySystem = entityManager.System<BodySystem>();
if (!entityManager.TryGetComponent<TransformComponent>(entityUid, out var transform)) return;
var parent = transform.ParentUid;
if (entityManager.TryGetComponent<BodyComponent>(parent, out var body) &&
entityManager.TryGetComponent<BodyPartComponent>(entityUid, out var part))
if (bodySystem.DropPart(entityUid))
{
body.RemovePart(part);
shell.WriteLine($"Removed body part {entityManager.ToPrettyString(entityUid)}.");
}
else
{