2022-06-21 14:04:55 +12:00
|
|
|
using Content.Server.Atmos.Piping.Binary.Components;
|
2022-03-01 03:39:30 +13:00
|
|
|
using Content.Server.Atmos.Piping.Unary.EntitySystems;
|
|
|
|
|
using Content.Shared.Atmos;
|
2021-06-19 13:25:05 +02:00
|
|
|
|
|
|
|
|
namespace Content.Server.Atmos.Piping.Unary.Components
|
|
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(GasOutletInjectorSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class GasOutletInjectorComponent : Component
|
2021-06-19 13:25:05 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool Enabled { get; set; } = true;
|
|
|
|
|
|
2022-03-01 03:39:30 +13:00
|
|
|
/// <summary>
|
|
|
|
|
/// Target volume to transfer. If <see cref="WideNet"/> is enabled, actual transfer rate will be much higher.
|
|
|
|
|
/// </summary>
|
2021-06-19 13:25:05 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2022-03-01 03:39:30 +13:00
|
|
|
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")]
|
2022-06-21 14:04:55 +12:00
|
|
|
public float MaxPressure { get; set; } = GasVolumePumpComponent.DefaultHigherThreshold;
|
2021-06-19 13:25:05 +02:00
|
|
|
|
|
|
|
|
[DataField("inlet")]
|
|
|
|
|
public string InletName { get; set; } = "pipe";
|
|
|
|
|
}
|
|
|
|
|
}
|