using Content.Server.Animals.Systems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Animals.Components;
///
/// Lets an entity produce wool fibers. Uses hunger if present.
///
[RegisterComponent, Access(typeof(WoolySystem))]
public sealed partial class WoolyComponent : Component
{
///
/// The reagent to grow.
///
[DataField, ViewVariables(VVAccess.ReadOnly)]
public ProtoId ReagentId = "Fiber";
///
/// The name of .
///
[DataField, ViewVariables(VVAccess.ReadOnly)]
public string SolutionName = "wool";
///
/// The solution to add reagent to.
///
[DataField]
public Entity? Solution;
///
/// The amount of reagent to be generated on update.
///
[DataField, ViewVariables(VVAccess.ReadOnly)]
public FixedPoint2 Quantity = 25;
///
/// The amount of nutrient consumed on update.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float HungerUsage = 10f;
///
/// How long to wait before growing wool.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan GrowthDelay = TimeSpan.FromMinutes(1);
///
/// When to next try growing wool.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextGrowth = TimeSpan.FromSeconds(0);
}