]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add Vox atmosphere marker, vents, and air alarms
authordeltanedas <@deltanedas:kde.org>
Thu, 22 Aug 2024 15:38:21 +0000 (16:38 +0100)
committerKevin Zheng <kevinz5000@gmail.com>
Sat, 24 Aug 2024 21:21:59 +0000 (14:21 -0700)
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs
Resources/Prototypes/Atmospherics/thresholds.yml
Resources/Prototypes/Entities/Markers/atmos_blocker.yml
Resources/Prototypes/Entities/Structures/Specific/Atmospherics/vox.yml [new file with mode: 0644]

index 5a41a7567b2797f3beddb300c0156fff1bea4b47..b790493c448542b70bcdead9ebf7307b42772fc8 100644 (file)
@@ -36,7 +36,7 @@ public sealed partial class AtmosphereSystem
            return;
        }
 
-       var mixtures = new GasMixture[7];
+       var mixtures = new GasMixture[8];
        for (var i = 0; i < mixtures.Length; i++)
            mixtures[i] = new GasMixture(Atmospherics.CellVolume) { Temperature = Atmospherics.T20C };
 
@@ -65,6 +65,9 @@ public sealed partial class AtmosphereSystem
        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: Nitrogen (101kpa) for vox rooms
+       mixtures[7].AdjustMoles(Gas.Nitrogen, Atmospherics.MolesCellStandard);
+
        foreach (var arg in args)
        {
            if (!NetEntity.TryParse(arg, out var netEntity) || !TryGetEntity(netEntity, out var euid))
index 5d8eebd522051b0ab78083c01df568677736b7ab..260fadbe7136558fd150439de03b05a0daac5643 100644 (file)
   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%
index a5e91e6e53688103b91d04ec9a862dc3c0d1eb9d..011e49696e401e90a9e7913e90e7669e157356c1 100644 (file)
           state: freeze
     - type: AtmosFixMarker
       mode: 6
+
+- type: entity
+  parent: AtmosFixNitrogenMarker
+  id: AtmosFixVoxMarker
+  suffix: Vox Atmosphere
+  description: "Nitrogen @ 101 kPa, 20C"
+  components:
+  - type: AtmosFixMarker
+    mode: 7
diff --git a/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/vox.yml b/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/vox.yml
new file mode 100644 (file)
index 0000000..a13d376
--- /dev/null
@@ -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