mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* Fixes Cryoxadone De-Age, properly adjusts lastHarvest. If age would be reduced below 0 reverts plant to seed with current genetics. * Botany Bugfixes. Cryoxadone De-Age fix. Cryox Regression to seed re-added. Seedless Produce no longer have seeds. Proper Temp tollerance ranges restored. Production no longer clamped to maturation. * Restore Content Server+Client run configuration * Fix formatting in Content Server+Client run configuration * Address botany review feedback * review * fix weed * fix * fix 2 * Update PlantSystem.cs * refactor: revert to EntityTerminatingEvent and leave warning for next generations --------- Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com> Co-authored-by: Fildrance <fildrance@gmail.com>
67 lines
2 KiB
C#
67 lines
2 KiB
C#
using Content.Shared.Botany.Systems;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Botany.Components;
|
|
|
|
/// <summary>
|
|
/// Component for storing plant growth data.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true, raiseAfterAutoHandleState: true)]
|
|
[Access(typeof(PlantSystem), typeof(PlantMutationSystem))]
|
|
public sealed partial class PlantComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The mutation effects that have been applied to this plant.
|
|
/// Server-only: mutations are applied as effects which are synced separately.
|
|
/// </summary>
|
|
[DataField]
|
|
public List<RandomPlantMutation> Mutations = [];
|
|
|
|
/// <summary>
|
|
/// The plant's max health.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float Endurance = 100f;
|
|
|
|
/// <summary>
|
|
/// How many produce are created on harvest.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public int Yield;
|
|
|
|
/// <summary>
|
|
/// The number of growth ticks this plant can be alive for. Plants take high damage levels when Age > Lifespan.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float Lifespan;
|
|
|
|
/// <summary>
|
|
/// Damage from old age.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float OldAgeDamage = 4f;
|
|
|
|
/// <summary>
|
|
/// The number of growth ticks it takes for a plant to reach its final growth stage.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float Maturation;
|
|
|
|
/// <summary>
|
|
/// The number of growth ticks it takes for a plant to be (re-)harvestable.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float Production;
|
|
|
|
/// <summary>
|
|
/// How many different sprites appear before the plant is fully grown.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public int GrowthStages = 6;
|
|
|
|
/// <summary>
|
|
/// A scalar for sprite size and chemical solution volume in the produce. Caps at 100.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float Potency = 1f;
|
|
}
|