Implement traits system (#10693)

This commit is contained in:
Visne
2022-09-10 17:40:06 +02:00
committed by GitHub
parent e1782ec22b
commit 4cc5fa239e
17 changed files with 3006 additions and 29 deletions

View File

@@ -0,0 +1,28 @@
using Robust.Shared.Prototypes;
using static Robust.Shared.Prototypes.EntityPrototype; // don't worry about it
namespace Content.Shared.Traits
{
/// <summary>
/// Describes a trait.
/// </summary>
[Prototype("trait")]
public sealed class TraitPrototype : IPrototype
{
[ViewVariables]
[IdDataField]
public string ID { get; } = default!;
/// <summary>
/// The name of this trait.
/// </summary>
[DataField("name")]
public string Name { get; } = string.Empty;
/// <summary>
/// The components that get added to the player, when they pick this trait.
/// </summary>
[DataField("components")]
public ComponentRegistry Components { get; } = default!;
}
}