Files
crystall-punk-14/Content.Shared/Traits/TraitPrototype.cs

56 lines
1.7 KiB
C#
Raw Normal View History

using Content.Shared.Whitelist;
2022-09-10 17:40:06 +02:00
using Robust.Shared.Prototypes;
2023-05-12 23:11:35 -04:00
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
// don't worry about it
2022-09-10 17:40:06 +02:00
namespace Content.Shared.Traits
{
/// <summary>
/// Describes a trait.
/// </summary>
[Prototype("trait")]
public sealed partial class TraitPrototype : IPrototype
2022-09-10 17:40:06 +02:00
{
[ViewVariables]
[IdDataField]
public string ID { get; private set; } = default!;
2022-09-10 17:40:06 +02:00
/// <summary>
/// The name of this trait.
/// </summary>
[DataField("name")]
public string Name { get; private set; } = "";
2022-09-10 17:40:06 +02:00
/// <summary>
/// The description of this trait.
/// </summary>
[DataField("description")]
public string? Description { get; private set; }
/// <summary>
/// Don't apply this trait to entities this whitelist IS NOT valid for.
/// </summary>
[DataField("whitelist")]
public EntityWhitelist? Whitelist;
/// <summary>
/// Don't apply this trait to entities this whitelist IS valid for. (hence, a blacklist)
/// </summary>
[DataField("blacklist")]
public EntityWhitelist? Blacklist;
2022-09-10 17:40:06 +02:00
/// <summary>
/// The components that get added to the player, when they pick this trait.
/// </summary>
[DataField("components")]
public ComponentRegistry Components { get; private set; } = default!;
2023-05-12 23:11:35 -04:00
/// <summary>
/// Gear that is given to the player, when they pick this trait.
/// </summary>
[DataField("traitGear", required: false, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? TraitGear;
2022-09-10 17:40:06 +02:00
}
}