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

@@ -0,0 +1,44 @@
using Content.Shared.Body.Components;
using Content.Shared.Body.Organ;
using Content.Shared.Body.Systems;
using Robust.Shared.GameStates;
namespace Content.Shared.Body.Part;
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedBodySystem))]
public sealed class BodyPartComponent : Component
{
[ViewVariables]
[DataField("body")]
public EntityUid? Body;
[ViewVariables]
[DataField("parent")]
public BodyPartSlot? ParentSlot;
[ViewVariables]
[DataField("children")]
public Dictionary<string, BodyPartSlot> Children = new();
[ViewVariables]
[DataField("organs")]
public Dictionary<string, OrganSlot> Organs = new();
[ViewVariables]
[DataField("partType")]
public BodyPartType PartType = BodyPartType.Other;
// TODO BODY Replace with a simulation of organs
/// <summary>
/// Whether or not the owning <see cref="Body"/> will die if all
/// <see cref="BodyComponent"/>s of this type are removed from it.
/// </summary>
[ViewVariables]
[DataField("vital")]
public bool IsVital;
[ViewVariables]
[DataField("symmetry")]
public BodyPartSymmetry Symmetry = BodyPartSymmetry.None;
}