Make atmos Turing-complete (#10520)

* Add pneumatic valves

Pneumatic valves permit bidirectional flow between the inlet and outlet
if the pressure at the control port is high enough.

* Add construction recipe
This commit is contained in:
Kevin Zheng
2022-08-11 14:19:31 -07:00
committed by GitHub
parent 3d511900e9
commit 9cb7e0f6c4
8 changed files with 242 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
using Content.Shared.Atmos;
namespace Content.Server.Atmos.Piping.Trinary.Components
{
[RegisterComponent]
public sealed class PressureControlledValveComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
[DataField("inlet")]
public string InletName { get; set; } = "inlet";
[ViewVariables(VVAccess.ReadWrite)]
[DataField("control")]
public string ControlName { get; set; } = "control";
[ViewVariables(VVAccess.ReadWrite)]
[DataField("outlet")]
public string OutletName { get; set; } = "outlet";
[ViewVariables(VVAccess.ReadOnly)]
[DataField("enabled")]
public bool Enabled { get; set; } = false;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("gain")]
public float Gain { get; set; } = 10;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("threshold")]
public float Threshold { get; set; } = Atmospherics.OneAtmosphere;
[DataField("maxTransferRate")]
public float MaxTransferRate { get; set; } = Atmospherics.MaxTransferRate;
}
}