RandomPlantMutation.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Content.Shared.EntityEffects;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Random;
  4. /// <summary>
  5. /// Data that specifies the odds and effects of possible random plant mutations.
  6. /// </summary>
  7. [Serializable, NetSerializable]
  8. [DataDefinition]
  9. public sealed partial class RandomPlantMutation
  10. {
  11. /// <summary>
  12. /// Odds of this mutation occurring with 1 point of mutation severity on a plant.
  13. /// </summary>
  14. [DataField]
  15. public float BaseOdds = 0;
  16. /// <summary>
  17. /// The name of this mutation.
  18. /// </summary>
  19. [DataField]
  20. public string Name = "";
  21. /// <summary>
  22. /// The actual EntityEffect to apply to the target
  23. /// </summary>
  24. [DataField]
  25. public EntityEffect Effect = default!;
  26. /// <summary>
  27. /// This mutation will target the harvested produce
  28. /// </summary>
  29. [DataField]
  30. public bool AppliesToProduce = true;
  31. /// <summary>
  32. /// This mutation will target the growing plant as soon as this mutation is applied.
  33. /// </summary>
  34. [DataField]
  35. public bool AppliesToPlant = true;
  36. /// <summary>
  37. /// This mutation stays on the plant and its produce. If false while AppliesToPlant is true, the effect will run when triggered.
  38. /// </summary>
  39. [DataField]
  40. public bool Persists = true;
  41. }