allow syringes to set transfer amount (#12173)

* allow syringes to set transfer amount

* stripped custom transfer logic, and added delay per additional 5u transfered

* touch up

* another touch
This commit is contained in:
Justin Trotter
2022-10-26 01:40:06 -05:00
committed by GitHub
parent 52a7a733af
commit f2d05aa20a
2 changed files with 62 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
using System.Threading;
using Content.Shared.Chemistry.Components;
using Content.Shared.FixedPoint;
using Content.Server.UserInterface;
using Robust.Server.GameObjects;
using Content.Shared.Chemistry;
namespace Content.Server.Chemistry.Components
{
@@ -22,6 +25,20 @@ namespace Content.Server.Chemistry.Components
[DataField("injectOnly")]
public bool InjectOnly;
/// <summary>
/// The minimum amount of solution that can be transferred at once from this solution.
/// </summary>
[DataField("minTransferAmount")]
[ViewVariables(VVAccess.ReadWrite)]
public FixedPoint2 MinimumTransferAmount { get; set; } = FixedPoint2.New(5);
/// <summary>
/// The maximum amount of solution that can be transferred at once from this solution.
/// </summary>
[DataField("maxTransferAmount")]
[ViewVariables(VVAccess.ReadWrite)]
public FixedPoint2 MaximumTransferAmount { get; set; } = FixedPoint2.New(50);
/// <summary>
/// Amount to inject or draw on each usage. If the injector is inject only, it will
/// attempt to inject it's entire contents upon use.