Adds cow milking (#5293)

This commit is contained in:
FoLoKe
2021-11-14 19:33:16 +03:00
committed by GitHub
parent 10bc316026
commit a23f3fde68
5 changed files with 222 additions and 0 deletions

View 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;
}
}