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:

View File

@@ -0,0 +1,42 @@
- type: constructionGraph
id: AirSensor
start: start
graph:
- node: start
edges:
- to: assembly
steps:
- material: Steel
amount: 2
doAfter: 1
- node: assembly
entity: AirSensorAssembly
actions:
- !type:SpriteStateChange
state: gsensor0
edges:
- to: start
conditions:
- !type:EntityAnchored
anchored: false
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 2
- !type:DeleteEntity {}
steps:
- tool: Screwing
doAfter: 2
- to: sensor
conditions:
- !type:EntityAnchored {}
steps:
- tool: Welding
doAfter: 5
- node: sensor
entity: AirSensor
edges:
- to: assembly
steps:
- tool: Welding
doAfter: 5

View File

@@ -284,6 +284,21 @@
conditions:
- !type:WallmountCondition {}
- type: construction
name: air sensor
id: AirSensor
graph: AirSensor
startNode: start
targetNode: sensor
category: construction-category-structures
description: An air sensor. Senses air.
icon:
sprite: Structures/Specific/Atmospherics/sensor.rsi
state: gsensor1
placementMode: SnapgridCenter
objectType: Structure
canRotate: true
# ATMOS PIPES
- type: construction
name: gas pipe half

View File

@@ -1,8 +1,14 @@
# Alphabetical order is now apparently required.
- type: Tag
id: AirAlarm
- type: Tag
id: AirAlarmElectronics
- type: Tag
id: AirSensor
- type: Tag
id: ATVKeys
@@ -180,6 +186,9 @@
- type: Tag
id: ExplosivePassable
- type: Tag
id: FireAlarm
- type: Tag
id: FireAlarmElectronics
@@ -210,6 +219,12 @@
- type: Tag
id: ForceNoFixRotations # fixrotations command WON'T target this
- type: Tag
id: GasScrubber
- type: Tag
id: GasVent
- type: Tag
id: Gauze