Adds fire/air alarms (#5018)

Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: E F R <602406+Efruit@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Flipp Syder
2022-01-01 20:56:24 -08:00
committed by GitHub
parent 903f796b0f
commit b1584793bf
71 changed files with 4340 additions and 29 deletions

View File

@@ -0,0 +1,77 @@
using System;
using Content.Shared.Atmos.Monitor.Components;
using Robust.Shared.Serialization;
namespace Content.Shared.Atmos.Piping.Unary.Components
{
[Serializable, NetSerializable]
public class GasVentPumpData : IAtmosDeviceData
{
public bool Enabled { get; set; }
public bool Dirty { get; set; }
public bool IgnoreAlarms { get; set; } = false;
public VentPumpDirection? PumpDirection { get; set; }
public VentPressureBound? PressureChecks { get; set; }
public float? ExternalPressureBound { get; set; }
public float? InternalPressureBound { get; set; }
// 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
};
public static GasVentPumpData Default()
{
return new GasVentPumpData
{
Enabled = true,
PumpDirection = VentPumpDirection.Releasing,
PressureChecks = VentPressureBound.ExternalBound,
ExternalPressureBound = Atmospherics.OneAtmosphere,
InternalPressureBound = 0f
};
}
}
[Serializable, NetSerializable]
public enum VentPumpDirection : sbyte
{
Siphoning = 0,
Releasing = 1,
}
[Flags]
[Serializable, NetSerializable]
public enum VentPressureBound : sbyte
{
NoBound = 0,
InternalBound = 1,
ExternalBound = 2,
}
}