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 milk. Uses hunger if present. /// { [RegisterComponent, Access(typeof(UdderSystem))] internal sealed partial class UdderComponent : Component { /// /// The reagent to produce. /// [DataField, ViewVariables(VVAccess.ReadOnly)] public ProtoId ReagentId = "Milk"; /// /// The name of . /// [DataField, ViewVariables(VVAccess.ReadOnly)] public string SolutionName = "udder"; /// /// The solution to add reagent to. /// [DataField] public Entity? Solution = null; /// /// The amount of reagent to be generated on update. /// [DataField, ViewVariables(VVAccess.ReadOnly)] public FixedPoint2 QuantityPerUpdate = 25; /// /// The amount of nutrient consumed on update. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float HungerUsage = 10f; /// /// How long to wait before producing. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public TimeSpan GrowthDelay = TimeSpan.FromMinutes(1); /// /// When to next try to produce. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] public TimeSpan NextGrowth = TimeSpan.FromSeconds(0); } }