Limit atmos device rates (#6533)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Content.Server.Atmos.Piping.Unary.EntitySystems;
|
||||
using Content.Shared.Atmos;
|
||||
|
||||
namespace Content.Server.Atmos.Piping.Unary.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[Friend(typeof(GasOutletInjectorSystem))]
|
||||
public sealed class GasOutletInjectorComponent : Component
|
||||
{
|
||||
|
||||
@@ -14,12 +14,26 @@ namespace Content.Server.Atmos.Piping.Unary.Components
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool Injecting { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Target volume to transfer. If <see cref="WideNet"/> is enabled, actual transfer rate will be much higher.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float VolumeRate { get; set; } = 50f;
|
||||
public float TransferRate
|
||||
{
|
||||
get => _transferRate;
|
||||
set => _transferRate = Math.Clamp(value, 0f, MaxTransferRate);
|
||||
}
|
||||
|
||||
private float _transferRate = 50;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("maxTransferRate")]
|
||||
public float MaxTransferRate = Atmospherics.MaxTransferRate;
|
||||
|
||||
[DataField("maxPressure")]
|
||||
public float MaxPressure { get; set; } = 2 * Atmospherics.MaxOutputPressure;
|
||||
|
||||
[DataField("inlet")]
|
||||
public string InletName { get; set; } = "pipe";
|
||||
|
||||
// TODO ATMOS: Inject method.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user