using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Animals;
/// <summary>
/// Gives the ability to produce a solution;
/// produces endlessly if the owner does not have a HungerComponent.
/// </summary>
[RegisterComponent, AutoGenerateComponentState, AutoGenerateComponentPause, NetworkedComponent]
public sealed partial class UdderComponent : Component
{
/// The reagent to produce.
[DataField, AutoNetworkedField]
public ProtoId<ReagentPrototype> ReagentId = new();
/// The name of <see cref="Solution"/>.
[DataField]
public string SolutionName = "udder";
/// The solution to add reagent to.
[ViewVariables(VVAccess.ReadOnly)]
public Entity<SolutionComponent>? Solution = null;
/// The amount of reagent to be generated on update.
public FixedPoint2 QuantityPerUpdate = 25;
/// The amount of nutrient consumed on update.
public float HungerUsage = 10f;
/// How long to wait before producing.
public TimeSpan GrowthDelay = TimeSpan.FromMinutes(1);
/// When to next try to produce.
[DataField, AutoPausedField, Access(typeof(UdderSystem))]
public TimeSpan NextGrowth = TimeSpan.Zero;
}