2022-11-03 21:37:17 -04:00
|
|
|
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;
|
2023-11-01 19:56:23 -07:00
|
|
|
|
|
|
|
|
// don't worry about it
|
2022-09-10 17:40:06 +02:00
|
|
|
|
|
|
|
|
namespace Content.Shared.Traits
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Describes a trait.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Prototype("trait")]
|
2023-11-01 19:56:23 -07:00
|
|
|
public sealed partial class TraitPrototype : IPrototype
|
2022-09-10 17:40:06 +02:00
|
|
|
{
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
[IdDataField]
|
2023-08-22 18:14:33 -07:00
|
|
|
public string ID { get; private set; } = default!;
|
2022-09-10 17:40:06 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of this trait.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("name")]
|
2022-12-20 23:25:34 +01:00
|
|
|
public string Name { get; private set; } = "";
|
2022-09-10 17:40:06 +02:00
|
|
|
|
2022-10-26 13:52:21 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The description of this trait.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("description")]
|
2022-12-20 23:25:34 +01:00
|
|
|
public string? Description { get; private set; }
|
2022-10-26 13:52:21 +02:00
|
|
|
|
2022-11-03 21:37:17 -04:00
|
|
|
/// <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")]
|
2023-08-22 18:14:33 -07:00
|
|
|
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>))]
|
2023-07-30 05:34:51 +12:00
|
|
|
public string? TraitGear;
|
2022-09-10 17:40:06 +02:00
|
|
|
}
|
|
|
|
|
}
|