Make constructed hydro trays start empty (#19620)
This commit is contained in:
@@ -1,90 +1,93 @@
|
|||||||
namespace Content.Server.Botany.Components
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||||
|
|
||||||
|
namespace Content.Server.Botany.Components;
|
||||||
|
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed partial class PlantHolderComponent : Component
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[DataField("nextUpdate", customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||||
public sealed partial class PlantHolderComponent : Component
|
public TimeSpan NextUpdate = TimeSpan.Zero;
|
||||||
{
|
[ViewVariables(VVAccess.ReadWrite), DataField("updateDelay")]
|
||||||
[ViewVariables]
|
public TimeSpan UpdateDelay = TimeSpan.FromSeconds(3);
|
||||||
public TimeSpan NextUpdate = TimeSpan.Zero;
|
|
||||||
public TimeSpan UpdateDelay = TimeSpan.FromSeconds(3);
|
|
||||||
|
|
||||||
[ViewVariables]
|
[DataField("lastProduce")]
|
||||||
public int LastProduce;
|
public int LastProduce;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("missingGas")]
|
||||||
public int MissingGas;
|
public int MissingGas;
|
||||||
|
|
||||||
public readonly TimeSpan CycleDelay = TimeSpan.FromSeconds(15f);
|
[DataField("cycleDelay")]
|
||||||
|
public TimeSpan CycleDelay = TimeSpan.FromSeconds(15f);
|
||||||
|
|
||||||
[ViewVariables]
|
[DataField("lastCycle", customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||||
public TimeSpan LastCycle = TimeSpan.Zero;
|
public TimeSpan LastCycle = TimeSpan.Zero;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("updateSpriteAfterUpdate")]
|
||||||
public bool UpdateSpriteAfterUpdate;
|
public bool UpdateSpriteAfterUpdate;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)] [DataField("drawWarnings")]
|
[ViewVariables(VVAccess.ReadWrite), DataField("drawWarnings")]
|
||||||
public bool DrawWarnings = false;
|
public bool DrawWarnings = false;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("waterLevel")]
|
||||||
public float WaterLevel = 100f;
|
public float WaterLevel = 100f;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("nutritionLevel")]
|
||||||
public float NutritionLevel = 100f;
|
public float NutritionLevel = 100f;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("pestLevel")]
|
||||||
public float PestLevel { get; set; }
|
public float PestLevel;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("weedLevel")]
|
||||||
public float WeedLevel { get; set; }
|
public float WeedLevel;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("toxins")]
|
||||||
public float Toxins { get; set; }
|
public float Toxins;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("age")]
|
||||||
public int Age { get; set; }
|
public int Age;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("skipAging")]
|
||||||
public int SkipAging { get; set; }
|
public int SkipAging;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("dead")]
|
||||||
public bool Dead { get; set; }
|
public bool Dead;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("harvest")]
|
||||||
public bool Harvest { get; set; }
|
public bool Harvest;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("sampled")]
|
||||||
public bool Sampled { get; set; }
|
public bool Sampled;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("yieldMod")]
|
||||||
public int YieldMod { get; set; } = 1;
|
public int YieldMod = 1;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("mutationMod")]
|
||||||
public float MutationMod { get; set; } = 1f;
|
public float MutationMod = 1f;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("mutationLevel")]
|
||||||
public float MutationLevel { get; set; }
|
public float MutationLevel;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("health")]
|
||||||
public float Health { get; set; }
|
public float Health;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("weedCoefficient")]
|
||||||
public float WeedCoefficient { get; set; } = 1f;
|
public float WeedCoefficient = 1f;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("seed")]
|
||||||
public SeedData? Seed { get; set; }
|
public SeedData? Seed;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("improperHeat")]
|
||||||
public bool ImproperHeat { get; set; }
|
public bool ImproperHeat;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("improperPressure")]
|
||||||
public bool ImproperPressure { get; set; }
|
public bool ImproperPressure;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("improperLight")]
|
||||||
public bool ImproperLight { get; set; }
|
public bool ImproperLight;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite), DataField("forceUpdate")]
|
||||||
public bool ForceUpdate { get; set; }
|
public bool ForceUpdate;
|
||||||
|
|
||||||
[DataField("solution")]
|
[ViewVariables(VVAccess.ReadWrite), DataField("solution")]
|
||||||
public string SoilSolutionName { get; set; } = "soil";
|
public string SoilSolutionName = "soil";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -435,7 +435,7 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: service
|
state: service
|
||||||
- type: MachineBoard
|
- type: MachineBoard
|
||||||
prototype: hydroponicsTray
|
prototype: HydroponicsTrayEmpty
|
||||||
materialRequirements:
|
materialRequirements:
|
||||||
# replacing the console screen
|
# replacing the console screen
|
||||||
Glass: 5
|
Glass: 5
|
||||||
@@ -975,4 +975,4 @@
|
|||||||
materialRequirements:
|
materialRequirements:
|
||||||
Steel: 5
|
Steel: 5
|
||||||
CableHV: 5
|
CableHV: 5
|
||||||
Uranium: 2
|
Uranium: 2
|
||||||
|
|||||||
@@ -89,3 +89,14 @@
|
|||||||
- type: GuideHelp
|
- type: GuideHelp
|
||||||
guides:
|
guides:
|
||||||
- Botany
|
- Botany
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: hydroponicsTray
|
||||||
|
id: HydroponicsTrayEmpty
|
||||||
|
suffix: Empty
|
||||||
|
components:
|
||||||
|
- type: PlantHolder
|
||||||
|
waterLevel: 0
|
||||||
|
nutritionLevel: 0
|
||||||
|
# for the lights to update immediately
|
||||||
|
updateSpriteAfterUpdate: true
|
||||||
|
|||||||
Reference in New Issue
Block a user