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,10 +1,8 @@
using Content.Shared.Body.Components;
using Content.Shared.Body.Organ;
using Robust.Client.Console;
using Robust.Client.GameObjects;
using Robust.Shared.Console;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Client.Commands
{
@@ -17,18 +15,18 @@ namespace Content.Client.Commands
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var entityManager = IoCManager.Resolve<IEntityManager>();
var mechanisms = entityManager.EntityQuery<MechanismComponent>(true);
var organs = entityManager.EntityQuery<OrganComponent>(true);
foreach (var mechanism in mechanisms)
foreach (var part in organs)
{
if (!entityManager.TryGetComponent(mechanism.Owner, out SpriteComponent? sprite))
if (!entityManager.TryGetComponent(part.Owner, out SpriteComponent? sprite))
{
continue;
}
sprite.ContainerOccluded = false;
var tempParent = mechanism.Owner;
var tempParent = part.Owner;
while (tempParent.TryGetContainer(out var container))
{
if (!container.ShowContents)