6
StarHorizon_Public/Content.Shared/Random/RandomPlantMutation.cs
2026-01-18 12:53:36 +03:00

55 lines
1.5 KiB
C#

using Content.Shared.EntityEffects;
using Robust.Shared.Serialization;
namespace Content.Shared.Random;
/// <summary>
/// Data that specifies the odds and effects of possible random plant mutations.
/// </summary>
[Serializable, NetSerializable]
[DataDefinition]
public sealed partial class RandomPlantMutation
{
/// <summary>
/// Odds of this mutation occurring with 1 point of mutation severity on a plant.
/// </summary>
[DataField]
public float BaseOdds = 0;
/// <summary>
/// The name of this mutation.
/// </summary>
[DataField]
public string Name = "";
/// <summary>
/// The text to display to players when examining something with this mutation.
/// </summary>
[DataField]
public LocId? Description;
/// <summary>
/// The actual EntityEffect to apply to the target
/// </summary>
[DataField]
public EntityEffect Effect = default!;
/// <summary>
/// This mutation will target the harvested produce
/// </summary>
[DataField]
public bool AppliesToProduce = true;
/// <summary>
/// This mutation will target the growing plant as soon as this mutation is applied.
/// </summary>
[DataField]
public bool AppliesToPlant = true;
/// <summary>
/// This mutation stays on the plant and its produce. If false while AppliesToPlant is true, the effect will run when triggered.
/// </summary>
[DataField]
public bool Persists = true;
}