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:
36
Content.Shared/Body/Components/BodyComponent.cs
Normal file
36
Content.Shared/Body/Components/BodyComponent.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Content.Shared.Body.Part;
|
||||
using Content.Shared.Body.Prototypes;
|
||||
using Content.Shared.Body.Systems;
|
||||
using Content.Shared.DragDrop;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Body.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[Access(typeof(SharedBodySystem))]
|
||||
public sealed class BodyComponent : Component, IDraggable
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<BodyPrototype>))]
|
||||
public readonly string? Prototype;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("root")]
|
||||
public BodyPartSlot Root = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("gibSound")]
|
||||
public SoundSpecifier GibSound = new SoundCollectionSpecifier("gib");
|
||||
|
||||
bool IDraggable.CanStartDrag(StartDragDropEvent args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IDraggable.CanDrop(CanDropEvent args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user