2024-03-31 09:12:07 +03:00
|
|
|
|
using System.Threading;
|
|
|
|
|
|
using Content.Shared.DoAfter;
|
2024-03-20 22:51:28 +03:00
|
|
|
|
using Content.Shared.FixedPoint;
|
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Chemistry.Components;
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed partial class PatchDoAfterEvent : SimpleDoAfterEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Implements draw/inject behavior for droppers and syringes.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// Can optionally support both
|
|
|
|
|
|
/// injection and drawing or just injection. Can inject/draw reagents from solution
|
|
|
|
|
|
/// containers, and can directly inject into a mobs bloodstream.
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
|
|
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
|
|
|
|
public sealed partial class PatchComponent : Component
|
|
|
|
|
|
{
|
2024-03-31 09:12:07 +03:00
|
|
|
|
//[ViewVariables, DataField]
|
|
|
|
|
|
public CancellationTokenSource CancelTokenSourceSkin = new();
|
|
|
|
|
|
public CancellationTokenSource CancelTokenSourceBlood = new();
|
2024-03-20 22:51:28 +03:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables, AutoNetworkedField]
|
|
|
|
|
|
public FixedPoint2 CurrentVolume;
|
|
|
|
|
|
|
|
|
|
|
|
[ViewVariables, AutoNetworkedField]
|
|
|
|
|
|
public FixedPoint2 TotalVolume;
|
|
|
|
|
|
|
|
|
|
|
|
[DataField("solutionName")]
|
|
|
|
|
|
public string SolutionName = "patch";
|
|
|
|
|
|
|
2024-03-31 09:12:07 +03:00
|
|
|
|
// Application only on mobs
|
2024-03-20 22:51:28 +03:00
|
|
|
|
[DataField("onlyMobs")]
|
|
|
|
|
|
public bool OnlyMobs = true;
|
|
|
|
|
|
|
2024-03-31 09:12:07 +03:00
|
|
|
|
// Application time used in calculation final time
|
|
|
|
|
|
[DataField("applicationTime")]
|
|
|
|
|
|
public FixedPoint2 BaseApplicationTime = 10;
|
|
|
|
|
|
|
|
|
|
|
|
// Delay used in calculation final delay time
|
2024-03-20 22:51:28 +03:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
[DataField("delay")]
|
|
|
|
|
|
public TimeSpan Delay = TimeSpan.FromSeconds(5);
|
|
|
|
|
|
|
|
|
|
|
|
}
|