]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add datafield comments to PlantHolderComponent (#35099)
authorPartmedia <kevinz5000@gmail.com>
Wed, 12 Feb 2025 09:59:40 +0000 (01:59 -0800)
committerGitHub <noreply@github.com>
Wed, 12 Feb 2025 09:59:40 +0000 (10:59 +0100)
Content.Server/Botany/Components/PlantHolderComponent.cs

index 235cd3050b574db1a8bad740f8cc576414ea96c3..d65e1b702be87c392f1e6e5eea09456edf9e930e 100644 (file)
@@ -7,8 +7,15 @@ namespace Content.Server.Botany.Components;
 [RegisterComponent]
 public sealed partial class PlantHolderComponent : Component
 {
+    /// <summary>
+    /// Game time for the next plant reagent update.
+    /// </summary>
     [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
     public TimeSpan NextUpdate = TimeSpan.Zero;
+
+    /// <summary>
+    /// Time between plant reagent consumption updates.
+    /// </summary>
     [DataField]
     public TimeSpan UpdateDelay = TimeSpan.FromSeconds(3);
 
@@ -18,18 +25,31 @@ public sealed partial class PlantHolderComponent : Component
     [DataField]
     public int MissingGas;
 
+    /// <summary>
+    /// Time between plant growth updates.
+    /// </summary>
     [DataField]
     public TimeSpan CycleDelay = TimeSpan.FromSeconds(15f);
 
+    /// <summary>
+    /// Game time when the plant last did a growth update.
+    /// </summary>
     [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
     public TimeSpan LastCycle = TimeSpan.Zero;
 
+    /// <summary>
+    /// Sound played when any reagent is transferred into the plant holder.
+    /// </summary>
     [DataField]
     public SoundSpecifier? WateringSound;
 
     [DataField]
     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]
     public bool DrawWarnings = false;
 
@@ -60,9 +80,16 @@ public sealed partial class PlantHolderComponent : Component
     [DataField]
     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]
     public bool Sampled;
 
+    /// <summary>
+    /// Multiplier for the number of entities produced at harvest.
+    /// </summary>
     [DataField]
     public int YieldMod = 1;
 
@@ -81,15 +108,28 @@ public sealed partial class PlantHolderComponent : Component
     [DataField]
     public SeedData? Seed;
 
+    /// <summary>
+    /// True if the plant is losing health due to too high/low temperature.
+    /// </summary>
     [DataField]
     public bool ImproperHeat;
 
+    /// <summary>
+    /// True if the plant is losing health due to too high/low pressure.
+    /// </summary>
     [DataField]
     public bool ImproperPressure;
 
+    /// <summary>
+    /// Not currently used.
+    /// </summary>
     [DataField]
     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]
     public bool ForceUpdate;