Files
Delta-v/Content.Shared/EntityEffects/EntityEffectPrototype.cs
deltanedasanddeltanedas f0b4c6ef2a add nested entity effects+conditions (#42341)
* add nested effect

* add nested condition

* move api to the main systems and improve effect guidebook text gen

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2026-06-29 12:44:00 +02:00

36 lines
1.0 KiB
C#

using Content.Shared.EntityConditions;
using Content.Shared.EntityEffects.Effects;
using Robust.Shared.Prototypes;
namespace Content.Shared.EntityEffects;
/// <summary>
/// A prototype for entity effects which can be reused via <see cref="NestedEffect"/>.
/// </summary>
[Prototype]
public sealed partial class EntityEffectPrototype: IPrototype
{
[IdDataField]
public string ID { get; private set; } = string.Empty;
/// <summary>
/// The effects of this prototype.
/// </summary>
[DataField(required: true)]
public EntityEffect[] Effects = default!;
/// <summary>
/// Conditions checked for this effect, regardless of the <see cref="NestedEffect"/> using it.
/// Currently not included in the guidebook text!
/// </summary>
[DataField]
public EntityCondition[]? Conditions;
/// <summary>
/// An override for the effect guidebook text, has "chance" passed from 0 to 1.
/// By default one is generated from each effect.
/// </summary>
[DataField]
public LocId? GuidebookText;
}