Implement traits system (#10693)
This commit is contained in:
28
Content.Shared/Traits/TraitPrototype.cs
Normal file
28
Content.Shared/Traits/TraitPrototype.cs
Normal 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!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user