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

70 lines
1.8 KiB
C#
Raw Normal View History

using Content.Shared.Whitelist;
2022-09-10 17:40:06 +02:00
using Robust.Shared.Prototypes;
2024-06-03 21:47:06 +03:00
namespace Content.Shared.Traits;
2022-09-10 17:40:06 +02:00
2024-06-03 21:47:06 +03:00
/// <summary>
/// Describes a trait.
/// </summary>
[Prototype]
public sealed partial class TraitPrototype : IPrototype
2022-09-10 17:40:06 +02:00
{
2024-06-03 21:47:06 +03:00
[ViewVariables]
[IdDataField]
public string ID { get; private set; } = default!;
/// <summary>
/// The name of this trait.
/// </summary>
[DataField]
public LocId Name { get; private set; } = string.Empty;
/// <summary>
/// The description of this trait.
/// </summary>
[DataField]
public LocId? Description { get; private set; }
/// <summary>
/// Don't apply this trait to entities this whitelist IS NOT valid for.
/// </summary>
[DataField]
public EntityWhitelist? Whitelist;
2022-09-10 17:40:06 +02:00
/// <summary>
2024-06-03 21:47:06 +03:00
/// Don't apply this trait to entities this whitelist IS valid for. (hence, a blacklist)
/// </summary>
[DataField]
public EntityWhitelist? Blacklist;
/// <summary>
/// The components that get added to the player, when they pick this trait.
/// </summary>
[DataField]
public ComponentRegistry Components { get; private set; } = new(); //CP14 new()
2024-06-03 21:47:06 +03:00
/// <summary>
/// Gear that is given to the player, when they pick this trait.
/// </summary>
[DataField]
public EntProtoId? TraitGear;
/// <summary>
/// Trait Price. If negative number, points will be added.
/// </summary>
[DataField]
public int Cost = 0;
/// <summary>
/// Adds a trait to a category, allowing you to limit the selection of some traits to the settings of that category.
/// </summary>
[DataField]
public ProtoId<TraitCategoryPrototype>? Category;
/// <summary>
/// CP14 - adding permanent spells into players mind
/// </summary>
[DataField]
public List<EntProtoId> Actions = new();
2022-09-10 17:40:06 +02:00
}