Merge pull request #10721 from vulppine/air-alarm-fixup

Air sensors & air alarm fixup
This commit is contained in:
Flipp Syder
2022-09-02 13:00:33 -07:00
committed by GitHub
51 changed files with 3168 additions and 2582 deletions

View File

@@ -5,9 +5,9 @@
description: Apply crowbar.
components:
- type: AtmosAlarmable
alarmedBy:
- FireAlarm
- AirAlarm
syncWith:
- FireAlarm
- AirAlarm
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetwork

View File

@@ -32,9 +32,25 @@
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
prefix: device-address-prefix-vent
- type: AtmosAlarmable
alarmedBy:
- AirAlarm
sendBroadcastAttemptEvent: true
- type: WiredNetworkConnection
- type: AtmosDevice
- type: AtmosMonitor
temperatureThreshold: stationTemperature
pressureThreshold: stationPressure
gasThresholds:
Oxygen: stationOxygen
Nitrogen: ignore
CarbonDioxide: stationCO2
Plasma: danger # everything below is usually bad
Tritium: danger
WaterVapor: danger
Miasma: danger
NitrousOxide: danger
Frezon: danger
- type: Tag
tags:
- GasVent
- type: Sprite
netsync: false
drawdepth: FloorObjects
@@ -108,9 +124,22 @@
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
prefix: device-address-prefix-scrubber
- type: AtmosAlarmable
alarmedBy:
- AirAlarm
- type: AtmosMonitor
temperatureThreshold: stationTemperature
pressureThreshold: stationPressure
gasThresholds:
Oxygen: stationOxygen
Nitrogen: ignore
CarbonDioxide: stationCO2
Plasma: danger # everything below is usually bad
Tritium: danger
WaterVapor: danger
Miasma: danger
NitrousOxide: danger
Frezon: danger
- type: Tag
tags:
- GasScrubber
- type: Sprite
netsync: false
drawdepth: FloorObjects

View File

@@ -0,0 +1,97 @@
- type: entity
id: AirSensor
name: air sensor
description: Air sensor. It senses air.
placement:
mode: SnapgridCenter
components:
- type: Transform
anchored: true
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Physics
canCollide: false
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mass: 5
mask:
- ItemMask
restitution: 0.3
friction: 0.2
- type: Clickable
- type: InteractionOutline
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetwork
deviceNetId: AtmosDevices
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
prefix: device-address-prefix-sensor
sendBroadcastAttemptEvent: true
- type: WiredNetworkConnection
- type: AtmosDevice
- type: AtmosMonitor
temperatureThreshold: stationTemperature
pressureThreshold: stationPressure
gasThresholds:
Oxygen: stationOxygen
Nitrogen: ignore
CarbonDioxide: stationCO2
Plasma: danger # everything below is usually bad
Tritium: danger
WaterVapor: danger
Miasma: danger
NitrousOxide: danger
Frezon: danger
- type: Tag
tags:
- AirSensor
- type: AccessReader
access: [ [ "Atmospherics" ] ]
- type: GenericVisualizer
visuals:
enum.PowerDeviceVisuals.Powered:
sensor:
True: { state: gsensor1 }
False: { state: gsensor0 }
- type: Construction
graph: AirSensor
node: sensor
- type: Sprite
netsync: false
drawdepth: FloorObjects
sprite: Structures/Specific/Atmospherics/sensor.rsi
layers:
- state: gsensor1
map: [ "sensor" ]
- type: entity
parent: BaseItem
id: AirSensorAssembly
name: air sensor assembly
description: Air sensor assembly. An assembly of air sensors?
components:
- type: Item
size: 10
- type: Anchorable
- type: Construction
graph: AirSensor
node: assembly
- type: Sprite
netsync: false
drawdepth: FloorObjects
sprite: Structures/Specific/Atmospherics/sensor.rsi
layers:
- state: gsensor0

View File

@@ -16,21 +16,23 @@
sendBroadcastAttemptEvent: true
- type: WiredNetworkConnection
- type: DeviceList
- type: AtmosMonitor
temperatureThreshold: stationTemperature
pressureThreshold: stationPressure
gasThresholds:
Oxygen: stationOxygen
Nitrogen: ignore
CarbonDioxide: stationCO2
Plasma: danger # everything below is usually bad
Tritium: danger
WaterVapor: danger
Miasma: danger
NitrousOxide: danger
Frezon: danger
- type: AtmosAlarmable
alarmedBy: ["AirAlarm"]
syncWith:
- AirAlarm
- AirSensor
- GasVent
- GasScrubber
- type: AtmosAlarmableVisuals
layerMap: "airAlarmBase"
alarmStates:
Normal: alarm0
Warning: alarm2
Danger: alarm1
setOnDepowered:
airAlarmBase: alarmp
- type: Tag
tags:
- AirAlarm
- type: AtmosDevice
- type: AirAlarm
- type: Clickable
@@ -47,15 +49,6 @@
- type: AccessReader
access: [["Atmospherics"]]
- type: Appearance
visuals:
- type: AtmosMonitorVisualizer
layerMap: "airAlarmBase"
alarmStates:
Normal: alarm0
Warning: alarm2
Danger: alarm1
setOnDepowered:
airAlarmBase: alarmp
- type: WiresVisuals
- type: Sprite
sprite: Structures/Wallmounts/air_monitors.rsi

View File

@@ -13,26 +13,35 @@
deviceNetId: AtmosDevices
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
- type: ApcNetworkConnection
- type: AtmosMonitor
monitorFire: true
displayMaxAlarmInNet: true
sendBroadcastAttemptEvent: true
- type: DeviceList
- type: WiredNetworkConnection
- type: AtmosDevice
- type: AtmosAlarmable
alarmedBy: ["FireAlarm"] # alarm itself, network effect
syncWith:
- FireAlarm
- AirSensor
- GasVent
- GasScrubber
monitorAlertTypes:
- Temperature
- type: AtmosAlarmableVisuals
layerMap: "fireAlarmState"
alarmStates:
Normal: fire_off
Warning: fire_off # shouldn't be alarming at a warning
Danger: fire_on
Emagged: fire_emagged
hideOnDepowered: [ "fireAlarmState" ]
- type: Tag
tags:
- FireAlarm
- type: Clickable
- type: InteractionOutline
- type: FireAlarm
- type: AccessReader
access: [ [ "Atmospherics" ] ]
- type: Appearance
visuals:
- type: AtmosMonitorVisualizer
layerMap: "fireAlarmState"
alarmStates:
Normal: fire_off
Warning: fire_off # shouldn't be alarming at a warning
Danger: fire_on
Emagged: fire_emagged
hideOnDepowered: ["fireAlarmState"]
- type: WiresVisuals
- type: AlertLevelDisplay
alertVisuals: