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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user