Adds cow milking (#5293)
This commit is contained in:
48
Content.Server/Animals/Components/UdderComponent.cs
Normal file
48
Content.Server/Animals/Components/UdderComponent.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Content.Server.Animals.Systems;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Animals.Components
|
||||
{
|
||||
[RegisterComponent, Friend(typeof(UdderSystem))]
|
||||
internal class UdderComponent : Component
|
||||
{
|
||||
public override string Name => "Udder";
|
||||
|
||||
/// <summary>
|
||||
/// The reagent to produce.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
[DataField("reagentId")]
|
||||
public string ReagentId = "Milk";
|
||||
|
||||
/// <summary>
|
||||
/// The solution to add reagent to.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
[DataField("targetSolution")]
|
||||
public string TargetSolutionName = "udder";
|
||||
|
||||
/// <summary>
|
||||
/// The amount of reagent to be generated on update.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
[DataField("quantity")]
|
||||
public FixedPoint2 QuantityPerUpdate = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The time between updates (in seconds).
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
[DataField("updateRate")]
|
||||
public float UpdateRate = 5;
|
||||
|
||||
public float AccumulatedFrameTime;
|
||||
|
||||
public bool BeingMilked;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user