2022-01-01 20:56:24 -08:00
|
|
|
using Content.Shared.Atmos.Monitor.Components;
|
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Atmos.Piping.Unary.Components
|
|
|
|
|
{
|
|
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class GasVentPumpData : IAtmosDeviceData
|
2022-01-01 20:56:24 -08:00
|
|
|
{
|
|
|
|
|
public bool Enabled { get; set; }
|
|
|
|
|
public bool Dirty { get; set; }
|
|
|
|
|
public bool IgnoreAlarms { get; set; } = false;
|
2022-04-22 23:21:00 -07:00
|
|
|
public VentPumpDirection PumpDirection { get; set; } = VentPumpDirection.Releasing;
|
|
|
|
|
public VentPressureBound PressureChecks { get; set; } = VentPressureBound.ExternalBound;
|
|
|
|
|
public float ExternalPressureBound { get; set; } = Atmospherics.OneAtmosphere;
|
|
|
|
|
public float InternalPressureBound { get; set; } = 0f;
|
2022-01-01 20:56:24 -08:00
|
|
|
|
|
|
|
|
// Presets for 'dumb' air alarm modes
|
|
|
|
|
|
|
|
|
|
public static GasVentPumpData FilterModePreset = new GasVentPumpData
|
|
|
|
|
{
|
|
|
|
|
Enabled = true,
|
|
|
|
|
PumpDirection = VentPumpDirection.Releasing,
|
|
|
|
|
PressureChecks = VentPressureBound.ExternalBound,
|
|
|
|
|
ExternalPressureBound = Atmospherics.OneAtmosphere,
|
|
|
|
|
InternalPressureBound = 0f
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public static GasVentPumpData FillModePreset = new GasVentPumpData
|
|
|
|
|
{
|
|
|
|
|
Enabled = true,
|
|
|
|
|
Dirty = true,
|
|
|
|
|
PumpDirection = VentPumpDirection.Releasing,
|
|
|
|
|
PressureChecks = VentPressureBound.ExternalBound,
|
|
|
|
|
ExternalPressureBound = Atmospherics.OneAtmosphere * 50,
|
|
|
|
|
InternalPressureBound = 0f
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public static GasVentPumpData PanicModePreset = new GasVentPumpData
|
|
|
|
|
{
|
|
|
|
|
Enabled = false,
|
|
|
|
|
Dirty = true,
|
|
|
|
|
PumpDirection = VentPumpDirection.Releasing,
|
|
|
|
|
PressureChecks = VentPressureBound.ExternalBound,
|
|
|
|
|
ExternalPressureBound = Atmospherics.OneAtmosphere,
|
|
|
|
|
InternalPressureBound = 0f
|
|
|
|
|
};
|
2022-08-19 04:40:50 -07:00
|
|
|
|
|
|
|
|
public static GasVentPumpData ReplaceModePreset = new GasVentPumpData
|
|
|
|
|
{
|
|
|
|
|
Enabled = false,
|
|
|
|
|
IgnoreAlarms = true,
|
|
|
|
|
Dirty = true,
|
|
|
|
|
PumpDirection = VentPumpDirection.Releasing,
|
|
|
|
|
PressureChecks = VentPressureBound.ExternalBound,
|
|
|
|
|
ExternalPressureBound = Atmospherics.OneAtmosphere,
|
|
|
|
|
InternalPressureBound = 0f
|
|
|
|
|
};
|
2022-01-01 20:56:24 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum VentPumpDirection : sbyte
|
|
|
|
|
{
|
|
|
|
|
Siphoning = 0,
|
|
|
|
|
Releasing = 1,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Flags]
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum VentPressureBound : sbyte
|
|
|
|
|
{
|
|
|
|
|
NoBound = 0,
|
|
|
|
|
InternalBound = 1,
|
|
|
|
|
ExternalBound = 2,
|
2022-03-01 03:39:30 +13:00
|
|
|
Both = 3,
|
2022-01-01 20:56:24 -08:00
|
|
|
}
|
|
|
|
|
}
|