1
0

SeedComponent.cs 1.2 KB

123456789101112131415161718192021222324252627282930
  1. using Content.Server.Botany.Systems;
  2. using Content.Shared.Botany.Components;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Server.Botany.Components
  5. {
  6. [RegisterComponent, Access(typeof(BotanySystem))]
  7. public sealed partial class SeedComponent : SharedSeedComponent
  8. {
  9. /// <summary>
  10. /// Seed data containing information about the plant type & properties that this seed can grow seed. If
  11. /// null, will instead attempt to get data from a seed prototype, if one is defined. See <see
  12. /// cref="SeedId"/>.
  13. /// </summary>
  14. [DataField("seed")]
  15. public SeedData? Seed;
  16. /// <summary>
  17. /// If not null, overrides the plant's initial health. Otherwise, the plant's initial health is set to the Endurance value.
  18. /// </summary>
  19. [DataField]
  20. public float? HealthOverride = null;
  21. /// <summary>
  22. /// Name of a base seed prototype that is used if <see cref="Seed"/> is null.
  23. /// </summary>
  24. [DataField("seedId", customTypeSerializer: typeof(PrototypeIdSerializer<SeedPrototype>))]
  25. public string? SeedId;
  26. }
  27. }