| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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
- {
- /// <summary>
- /// The reagent to produce.
- /// </summary>
- [DataField, AutoNetworkedField]
- public ProtoId<ReagentPrototype> ReagentId = new();
- /// <summary>
- /// The name of <see cref="Solution"/>.
- /// </summary>
- [DataField]
- public string SolutionName = "udder";
- /// <summary>
- /// The solution to add reagent to.
- /// </summary>
- [ViewVariables(VVAccess.ReadOnly)]
- public Entity<SolutionComponent>? Solution = null;
- /// <summary>
- /// The amount of reagent to be generated on update.
- /// </summary>
- [DataField, AutoNetworkedField]
- public FixedPoint2 QuantityPerUpdate = 25;
- /// <summary>
- /// The amount of nutrient consumed on update.
- /// </summary>
- [DataField, AutoNetworkedField]
- public float HungerUsage = 10f;
- /// <summary>
- /// How long to wait before producing.
- /// </summary>
- [DataField, AutoNetworkedField]
- public TimeSpan GrowthDelay = TimeSpan.FromMinutes(1);
- /// <summary>
- /// When to next try to produce.
- /// </summary>
- [DataField, AutoPausedField, Access(typeof(UdderSystem))]
- public TimeSpan NextGrowth = TimeSpan.Zero;
- }
|