diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs index 5a41a7567b2..e11d5f3b6e1 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs @@ -36,7 +36,7 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar return; } - var mixtures = new GasMixture[7]; + var mixtures = new GasMixture[8]; // DeltaV - vox mixture for (var i = 0; i < mixtures.Length; i++) mixtures[i] = new GasMixture(Atmospherics.CellVolume) { Temperature = Atmospherics.T20C }; @@ -65,6 +65,9 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar mixtures[6].AdjustMoles(Gas.Nitrogen, Atmospherics.NitrogenMolesStandard); mixtures[6].Temperature = 235f; // Little colder than an actual freezer but gives a grace period to get e.g. themomachines set up, should keep warm for a few door openings + // 7: DeltaV Nitrogen (101kpa) + mixtures[7].AdjustMoles(Gas.Nitrogen, Atmospherics.NitrogenMolesStandard + Atmospherics.OxygenMolesStandard); // DeltaV + foreach (var arg in args) { if (!NetEntity.TryParse(arg, out var netEntity) || !TryGetEntity(netEntity, out var euid)) diff --git a/Content.Server/Atmos/Monitor/Components/AirAlarmComponent.cs b/Content.Server/Atmos/Monitor/Components/AirAlarmComponent.cs index 93f704fe21b..643b0ce7823 100644 --- a/Content.Server/Atmos/Monitor/Components/AirAlarmComponent.cs +++ b/Content.Server/Atmos/Monitor/Components/AirAlarmComponent.cs @@ -11,8 +11,8 @@ namespace Content.Server.Atmos.Monitor.Components; [RegisterComponent] public sealed partial class AirAlarmComponent : Component { - [ViewVariables] public AirAlarmMode CurrentMode { get; set; } = AirAlarmMode.Filtering; - [ViewVariables] public bool AutoMode { get; set; } = true; + [DataField] public AirAlarmMode CurrentMode { get; set; } = AirAlarmMode.Filtering; + [DataField] public bool AutoMode { get; set; } = true; // Remember to null this afterwards. [ViewVariables] public IAirAlarmModeUpdate? CurrentModeUpdater { get; set; } diff --git a/Content.Server/Atmos/Piping/Trinary/Components/GasFilterComponent.cs b/Content.Server/Atmos/Piping/Trinary/Components/GasFilterComponent.cs index eac8dc83123..4400387dc8a 100644 --- a/Content.Server/Atmos/Piping/Trinary/Components/GasFilterComponent.cs +++ b/Content.Server/Atmos/Piping/Trinary/Components/GasFilterComponent.cs @@ -5,31 +5,25 @@ namespace Content.Server.Atmos.Piping.Trinary.Components [RegisterComponent] public sealed partial class GasFilterComponent : Component { - [ViewVariables(VVAccess.ReadWrite)] - [DataField("enabled")] - public bool Enabled { get; set; } = true; + [DataField] + public bool Enabled = true; - [ViewVariables(VVAccess.ReadWrite)] [DataField("inlet")] - public string InletName { get; set; } = "inlet"; + public string InletName = "inlet"; - [ViewVariables(VVAccess.ReadWrite)] [DataField("filter")] - public string FilterName { get; set; } = "filter"; + public string FilterName = "filter"; - [ViewVariables(VVAccess.ReadWrite)] [DataField("outlet")] - public string OutletName { get; set; } = "outlet"; + public string OutletName = "outlet"; - [ViewVariables(VVAccess.ReadWrite)] + [DataField] + public float TransferRate = Atmospherics.MaxTransferRate; - [DataField("transferRate")] - public float TransferRate { get; set; } = Atmospherics.MaxTransferRate; + [DataField] + public float MaxTransferRate = Atmospherics.MaxTransferRate; - [DataField("maxTransferRate")] - public float MaxTransferRate { get; set; } = Atmospherics.MaxTransferRate; - - [ViewVariables(VVAccess.ReadWrite)] - public Gas? FilteredGas { get; set; } + [DataField] + public Gas? FilteredGas; } } diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs index 33168d9db9c..b2143283f73 100644 --- a/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs +++ b/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs @@ -9,26 +9,25 @@ namespace Content.Server.Atmos.Piping.Unary.Components [Access(typeof(GasVentScrubberSystem))] public sealed partial class GasVentScrubberComponent : Component { - [ViewVariables(VVAccess.ReadWrite)] + [DataField] public bool Enabled { get; set; } = false; - [ViewVariables] + [DataField] public bool IsDirty { get; set; } = false; - [ViewVariables(VVAccess.ReadWrite)] [DataField("outlet")] public string OutletName { get; set; } = "pipe"; - [ViewVariables] - public readonly HashSet FilterGases = new(GasVentScrubberData.DefaultFilterGases); + [DataField] + public HashSet FilterGases = new(GasVentScrubberData.DefaultFilterGases); - [ViewVariables(VVAccess.ReadWrite)] + [DataField] public ScrubberPumpDirection PumpDirection { get; set; } = ScrubberPumpDirection.Scrubbing; /// /// Target volume to transfer. If is enabled, actual transfer rate will be much higher. /// - [ViewVariables(VVAccess.ReadWrite)] + [DataField] public float TransferRate { get => _transferRate; @@ -37,18 +36,17 @@ public float TransferRate private float _transferRate = Atmospherics.MaxTransferRate; - [ViewVariables(VVAccess.ReadWrite)] - [DataField("maxTransferRate")] + [DataField] public float MaxTransferRate = Atmospherics.MaxTransferRate; /// /// As pressure difference approaches this number, the effective volume rate may be smaller than /// - [DataField("maxPressure")] + [DataField] public float MaxPressure = Atmospherics.MaxOutputPressure; - [ViewVariables(VVAccess.ReadWrite)] + [DataField] public bool WideNet { get; set; } = false; public GasVentScrubberData ToAirAlarmData() diff --git a/Resources/Prototypes/Atmospherics/thresholds.yml b/Resources/Prototypes/Atmospherics/thresholds.yml index 194042fc26c..6a6ed418a5d 100644 --- a/Resources/Prototypes/Atmospherics/thresholds.yml +++ b/Resources/Prototypes/Atmospherics/thresholds.yml @@ -83,3 +83,17 @@ id: danger # just any gas you don't want at all upperBound: !type:AlarmThresholdSetting threshold: 0.0001 + +- type: alarmThreshold + id: voxOxygen + upperBound: !type:AlarmThresholdSetting + threshold: 0.02 # 2% + upperWarnAround: !type:AlarmThresholdSetting + threshold: 0.5 # 1% + +- type: alarmThreshold + id: voxNitrogen + lowerBound: !type:AlarmThresholdSetting + threshold: 0.8 # danger below 80% nitrogen + lowerWarnAround: !type:AlarmThresholdSetting + threshold: 1.125 # warning below 90% diff --git a/Resources/Prototypes/DeltaV/Entities/Markers/atmos_blocker.yml b/Resources/Prototypes/DeltaV/Entities/Markers/atmos_blocker.yml new file mode 100644 index 00000000000..240bf549948 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Markers/atmos_blocker.yml @@ -0,0 +1,8 @@ +- type: entity + parent: AtmosFixNitrogenMarker + id: AtmosFixVoxMarker + suffix: Vox Atmosphere + description: "Nitrogen @ 101 kpa, T20C" + components: + - type: AtmosFixMarker + mode: 7 diff --git a/Resources/Prototypes/DeltaV/Entities/Structures/Specific/Atmospherics/vox.yml b/Resources/Prototypes/DeltaV/Entities/Structures/Specific/Atmospherics/vox.yml new file mode 100644 index 00000000000..a13d3760429 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Structures/Specific/Atmospherics/vox.yml @@ -0,0 +1,50 @@ +- type: entity + abstract: true + parent: AirSensorBase + id: AirSensorVoxBase + suffix: Vox Atmosphere + components: + - type: AtmosMonitor + gasThresholdPrototypes: + Oxygen: voxOxygen + Nitrogen: voxNitrogen + CarbonDioxide: stationCO2 + Plasma: stationPlasma + Tritium: stationTritium + WaterVapor: stationWaterVapor + Ammonia: stationAmmonia + NitrousOxide: stationNO + Frezon: danger + +- type: entity + parent: [AirSensorVoxBase, AirSensor] + id: AirSensorVox + +- type: entity + parent: [AirSensorVoxBase, GasVentPump] + id: GasVentPumpVox + +- type: entity + parent: [AirSensorVoxBase, GasVentScrubber] + id: GasVentScrubberVox + components: + - type: GasVentScrubber + wideNet: true # Air alarm with auto mode overrides filters with hardcoded defaults so default to widenet + filterGases: + - Oxygen # filter out oxygen as well as regular harmful gases + - CarbonDioxide + - Plasma + - Tritium + - WaterVapor + - Ammonia + - NitrousOxide + - Frezon + +# use this to prevent overriding filters with hardcoded defaults +- type: entity + parent: AirAlarm + id: AirAlarmVox + suffix: Vox Atmosphere, auto mode disabled + components: + - type: AirAlarm + autoMode: false