Add datafield comments to PlantHolderComponent (#35099)
This commit is contained in:
@@ -7,8 +7,15 @@ namespace Content.Server.Botany.Components;
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed partial class PlantHolderComponent : Component
|
public sealed partial class PlantHolderComponent : Component
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Game time for the next plant reagent update.
|
||||||
|
/// </summary>
|
||||||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||||
public TimeSpan NextUpdate = TimeSpan.Zero;
|
public TimeSpan NextUpdate = TimeSpan.Zero;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Time between plant reagent consumption updates.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public TimeSpan UpdateDelay = TimeSpan.FromSeconds(3);
|
public TimeSpan UpdateDelay = TimeSpan.FromSeconds(3);
|
||||||
|
|
||||||
@@ -18,18 +25,31 @@ public sealed partial class PlantHolderComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public int MissingGas;
|
public int MissingGas;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Time between plant growth updates.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public TimeSpan CycleDelay = TimeSpan.FromSeconds(15f);
|
public TimeSpan CycleDelay = TimeSpan.FromSeconds(15f);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Game time when the plant last did a growth update.
|
||||||
|
/// </summary>
|
||||||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||||
public TimeSpan LastCycle = TimeSpan.Zero;
|
public TimeSpan LastCycle = TimeSpan.Zero;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sound played when any reagent is transferred into the plant holder.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public SoundSpecifier? WateringSound;
|
public SoundSpecifier? WateringSound;
|
||||||
|
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool UpdateSpriteAfterUpdate;
|
public bool UpdateSpriteAfterUpdate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true if the plant holder displays plant warnings (e.g. water low) in the sprite and
|
||||||
|
/// examine text. Used to differentiate hydroponic trays from simple soil plots.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool DrawWarnings = false;
|
public bool DrawWarnings = false;
|
||||||
|
|
||||||
@@ -60,9 +80,16 @@ public sealed partial class PlantHolderComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public bool Harvest;
|
public bool Harvest;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true if this plant has been clipped by seed clippers. Used to prevent a single plant
|
||||||
|
/// from repeatedly being clipped.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool Sampled;
|
public bool Sampled;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Multiplier for the number of entities produced at harvest.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public int YieldMod = 1;
|
public int YieldMod = 1;
|
||||||
|
|
||||||
@@ -81,15 +108,28 @@ public sealed partial class PlantHolderComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public SeedData? Seed;
|
public SeedData? Seed;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// True if the plant is losing health due to too high/low temperature.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool ImproperHeat;
|
public bool ImproperHeat;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// True if the plant is losing health due to too high/low pressure.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool ImproperPressure;
|
public bool ImproperPressure;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Not currently used.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool ImproperLight;
|
public bool ImproperLight;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to force a plant update (visuals, component, etc.) regardless of the current
|
||||||
|
/// update cycle time. Typically used when some interaction affects this plant.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool ForceUpdate;
|
public bool ForceUpdate;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user