]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Move air sensor components into abstract base prototype (#29261)
authorPartmedia <kevinz5000@gmail.com>
Sat, 22 Jun 2024 04:57:14 +0000 (20:57 -0800)
committerGitHub <noreply@github.com>
Sat, 22 Jun 2024 04:57:14 +0000 (21:57 -0700)
Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml
Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml

index 2b00fec246f6c5e265915ad7ed40b0973e729e65..207d5ee692978df025c08b1737374add236d87b8 100644 (file)
@@ -21,7 +21,7 @@
     - type: CollideOnAnchor
 
 - type: entity
-  parent: GasUnaryBase
+  parent: [GasUnaryBase, AirSensorBase]
   id: GasVentPump
   name: air vent
   description: Has a valve and a pump attached to it.
     - type: ApcPowerReceiver
     - type: ExtensionCableReceiver
     - type: DeviceNetwork
-      deviceNetId: AtmosDevices
-      receiveFrequencyId: AtmosMonitor
-      transmitFrequencyId: AtmosMonitor
       prefix: device-address-prefix-vent
-      sendBroadcastAttemptEvent: true
-      examinableAddress: true
-    - type: WiredNetworkConnection
-    - type: DeviceNetworkRequiresPower
-    - type: AtmosDevice
-    - type: AtmosMonitor
-      temperatureThresholdId: stationTemperature
-      pressureThresholdId: stationPressure
-      gasThresholdPrototypes:
-        Oxygen: stationOxygen
-        Nitrogen: ignore
-        CarbonDioxide: stationCO2
-        Plasma: stationPlasma # everything below is usually bad
-        Tritium: danger
-        WaterVapor: stationWaterVapor
-        Ammonia: stationAmmonia
-        NitrousOxide: stationNO
-        Frezon: danger
     - type: Tag
       tags:
         - GasVent
       node: passivevent
 
 - type: entity
-  parent: GasUnaryBase
+  parent: [GasUnaryBase, AirSensorBase]
   id: GasVentScrubber
   name: air scrubber
   description: Has a valve and pump attached to it.
     - type: ApcPowerReceiver
     - type: ExtensionCableReceiver
     - type: DeviceNetwork
-      deviceNetId: AtmosDevices
-      receiveFrequencyId: AtmosMonitor
-      transmitFrequencyId: AtmosMonitor
       prefix: device-address-prefix-scrubber
-      examinableAddress: true
-    - type: DeviceNetworkRequiresPower
-    - type: AtmosMonitor
-      temperatureThresholdId: stationTemperature
-      pressureThresholdId: stationPressure
-      gasThresholdPrototypes:
-        Oxygen: stationOxygen
-        Nitrogen: ignore
-        CarbonDioxide: stationCO2
-        Plasma: stationPlasma # everything below is usually bad
-        Tritium: danger
-        WaterVapor: stationWaterVapor
-        Ammonia: stationAmmonia
-        NitrousOxide: stationNO
-        Frezon: danger
     - type: Tag
       tags:
         - GasScrubber
index 2df48a584cd034e9e038604196cf6daebd76073e..82f9a808fad0e3429e29073ad0818e1ade25d3cf 100644 (file)
@@ -1,7 +1,39 @@
+- type: entity
+  id: AirSensorBase
+  abstract: true
+  components:
+    - type: DeviceNetwork
+      deviceNetId: AtmosDevices
+      receiveFrequencyId: AtmosMonitor
+      transmitFrequencyId: AtmosMonitor
+      prefix: device-address-prefix-sensor
+      sendBroadcastAttemptEvent: true
+      examinableAddress: true
+    - type: WiredNetworkConnection
+    - type: DeviceNetworkRequiresPower
+    - type: AtmosDevice
+    - type: AtmosMonitor
+      temperatureThresholdId: stationTemperature
+      pressureThresholdId: stationPressure
+      gasThresholdPrototypes:
+        Oxygen: stationOxygen
+        Nitrogen: ignore
+        CarbonDioxide: stationCO2
+        Plasma: stationPlasma # everything below is usually bad
+        Tritium: danger
+        WaterVapor: stationWaterVapor
+        Ammonia: stationAmmonia
+        NitrousOxide: stationNO
+        Frezon: danger
+    - type: Tag
+      tags:
+        - AirSensor
+
 - type: entity
   id: AirSensor
   name: air sensor
   description: Air sensor. It senses air.
+  parent: AirSensorBase
   placement:
     mode: SnapgridCenter
   components:
     - type: InteractionOutline
     - type: ApcPowerReceiver
     - type: ExtensionCableReceiver
-    - type: DeviceNetwork
-      deviceNetId: AtmosDevices
-      receiveFrequencyId: AtmosMonitor
-      transmitFrequencyId: AtmosMonitor
-      prefix: device-address-prefix-sensor
-      sendBroadcastAttemptEvent: true
-      examinableAddress: true
-    - type: WiredNetworkConnection
-    - type: DeviceNetworkRequiresPower
-    - type: AtmosDevice
-    - type: AtmosMonitor
-      temperatureThresholdId: stationTemperature
-      pressureThresholdId: stationPressure
-      gasThresholdPrototypes:
-        Oxygen: stationOxygen
-        Nitrogen: ignore
-        CarbonDioxide: stationCO2
-        Plasma: stationPlasma # everything below is usually bad
-        Tritium: danger
-        WaterVapor: stationWaterVapor
-        Ammonia: stationAmmonia
-        NitrousOxide: stationNO
-        Frezon: danger
-    - type: Tag
-      tags:
-        - AirSensor
     - type: AccessReader
       access: [ [ "Atmospherics" ] ]
     - type: Construction