Adds fire/air alarms (#5018)

Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: E F R <602406+Efruit@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Flipp Syder
2022-01-01 20:56:24 -08:00
committed by GitHub
parent 903f796b0f
commit b1584793bf
71 changed files with 4340 additions and 29 deletions

View File

@@ -0,0 +1,31 @@
- type: alarmThreshold
id: stationTemperature
upperBound: 1465.75 # T20C * 5
lowerBound: 193.15 # T20C - 100
upperWarnAround: 0.25
lowerWarnAround: 1.1
- type: alarmThreshold
id: stationPressure
upperBound: 550 # as defined in Atmospherics.cs
lowerBound: 20 # as defined in Atmospherics.cs
upperWarnAround: 0.7
lowerWarnAround: 2.5
- type: alarmThreshold
id: stationOxygen
lowerBound: 0.0010
lowerWarnAround: 1.5
- type: alarmThreshold
id: stationCO2
upperBound: 0.0025
upperWarnAround: 0.5
- type: alarmThreshold
id: ignore # just ignore nitrogen??? ??? ???
ignore: true
- type: alarmThreshold
id: danger # just any gas you don't want at all
upperBound: 0.0001

View File

@@ -0,0 +1,23 @@
- type: entity
id: AirAlarmElectronics
parent: BaseItem
name: air alarm electronics
components:
- type: Tag
tags:
- AirAlarmElectronics
- type: Sprite
sprite: Objects/Misc/module.rsi
state: door_electronics
- type: entity
id: FireAlarmElectronics
parent: BaseItem
name: fire alarm electronics
components:
- type: Tag
tags:
- FireAlarmElectronics
- type: Sprite
sprite: Objects/Misc/module.rsi
state: door_electronics

View File

@@ -4,6 +4,16 @@
name: firelock
description: Apply crowbar.
components:
- type: AtmosAlarmable
alarmedBy:
- FireAlarm
- AirAlarm
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetworkComponent
deviceNetId: Apc
frequency: 1621
- type: ApcNetworkConnection
- type: InteractionOutline
- type: Damageable
damageContainer: Inorganic

View File

@@ -21,6 +21,15 @@
placement:
mode: SnapgridCenter
components:
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetworkComponent
deviceNetId: Apc
frequency: 1621
- type: ApcNetworkConnection
- type: AtmosAlarmable
alarmedBy:
- AirAlarm
- type: Sprite
netsync: false
drawdepth: FloorObjects
@@ -73,6 +82,15 @@
placement:
mode: SnapgridCenter
components:
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetworkComponent
deviceNetId: Apc
frequency: 1621
- type: ApcNetworkConnection
- type: AtmosAlarmable
alarmedBy:
- AirAlarm
- type: Sprite
netsync: false
drawdepth: FloorObjects

View File

@@ -0,0 +1,90 @@
- type: entity
id: AirAlarm
name: air alarm
description: An air alarm. Alarms... air?
components:
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetworkComponent
deviceNetId: Apc
frequency: 1621
- type: ApcNetworkConnection
- type: AtmosMonitor
temperatureThreshold: stationTemperature
pressureThreshold: stationPressure
gasThresholds:
Oxygen: stationOxygen
Nitrogen: ignore
CarbonDioxide: stationCO2
Plasma: danger # everything below is usually bad
Tritium: danger
WaterVapor: danger
- type: AtmosAlarmable
alarmedBy: ["AirAlarm"]
- type: AtmosDevice
- type: AirAlarm
- type: Clickable
- type: InteractionOutline
- type: UserInterface
interfaces:
- key: enum.SharedAirAlarmInterfaceKey.Key
type: AirAlarmBoundUserInterface
- key: enum.WiresUiKey.Key
type: WiresBoundUserInterface
- type: Wires
BoardName: "Air Alarm"
LayoutId: AirAlarm
- type: Physics
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.3,0.25"
layer: [ Passable ]
- type: AccessReader
access: [["Engineering"]]
- type: Appearance
visuals:
- type: AtmosMonitorVisualizer
layerMap: "airAlarmBase"
alarmStates:
Normal: alarm0
Warning: alarm2
Danger: alarm1
setOnDepowered:
airAlarmBase: alarmp
- type: WiresVisualizer
- type: Sprite
sprite: Structures/Wallmounts/air_monitors.rsi
layers:
- state: alarm0
map: ["airAlarmBase"] # TODO: fire alarm enum
- state: alarmx
map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: Transform
anchored: true
- type: Construction
graph: air_alarm
node: air_alarm
placement:
mode: SnapgridCenter
snap:
- Wallmount
- type: entity
id: AirAlarmAssembly
name: air alarm assembly
description: An air alarm. Doesn't look like it'll be alarming air any time soon.
components:
- type: Clickable
- type: InteractionOutline
- type: Sprite
sprite: Structures/Wallmounts/air_monitors.rsi
state: alarm_b1
- type: Construction
graph: air_alarm
node: assembly
placement:
mode: SnapgridCenter
snap:
- Wallmount

View File

@@ -0,0 +1,73 @@
- type: entity
id: FireAlarm
name: fire alarm
description: A fire alarm. Spicy!
components:
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetworkComponent
deviceNetId: Apc
frequency: 1621
- type: ApcNetworkConnection
- type: AtmosMonitor
monitorFire: true
displayMaxAlarmInNet: true
- type: AtmosDevice
- type: AtmosAlarmable
alarmedBy: ["FireAlarm"] # alarm itself, network effect
- type: Clickable
- type: InteractionOutline
- type: FireAlarm
- type: Appearance
visuals:
- type: AtmosMonitorVisualizer
layerMap: "fireAlarmState"
alarmStates:
Normal: fire_off
Warning: fire_off # shouldn't be alarming at a warning
Danger: fire_on
hideOnDepowered: ["fireAlarmState"]
- type: WiresVisualizer
- type: UserInterface
interfaces:
- key: enum.WiresUiKey.Key
type: WiresBoundUserInterface
- type: Wires
BoardName: "Fire Alarm"
LayoutId: FireAlarm
- type: Sprite
sprite: Structures/Wallmounts/air_monitors.rsi
layers:
- state: fire0
map: ["fireAlarmBase"]
- state: fire_off
map: ["fireAlarmState"]
- state: fire_b2
map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: Transform
anchored: true
- type: Construction
graph: fire_alarm
node: fire_alarm
placement:
mode: SnapgridCenter
snap:
- Wallmount
- type: entity
id: FireAlarmAssembly
name: fire alarm assembly
description: A fire alarm assembly. Very mild.
components:
- type: Clickable
- type: InteractionOutline
- type: Sprite
sprite: Structures/Wallmounts/air_monitors.rsi
state: fire_b1
- type: Construction
graph: fire_alarm
node: assembly
placement:
mode: SnapgridCenter
snap:
- Wallmount

View File

@@ -0,0 +1,157 @@
- type: constructionGraph
id: air_alarm
start: start
graph:
- node: start
edges:
- to: assembly
steps:
- material: Steel
amount: 2
doAfter: 2.0
- node: assembly
entity: AirAlarmAssembly
actions:
- !type:SpriteStateChange
state: alarm_b1
edges:
- to: wired
steps:
- material: Cable
amount: 2
doAfter: 1
- to: start
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 2
- !type:DeleteEntity {}
steps:
- tool: Welding
doAfter: 2
- node: wired
entity: AirAlarmAssembly
edges:
- to: electronics
steps:
- tag: AirAlarmElectronics
store: board
name: "air alarm electronics"
icon:
sprite: "Objects/Misc/module.rsi"
state: "door_electronics" # /tg/ uses the same sprite, right?
doAfter: 1
- to: assembly
completed:
- !type:SpawnPrototype
prototype: CableApcStack1
amount: 2
steps:
- tool: Cutting
doAfter: 1
- node: electronics
actions:
- !type:SpriteStateChange
state: alarm_b2
edges:
- to: air_alarm
steps:
- tool: Screwing
doAfter: 2
- node: air_alarm
entity: AirAlarm
edges:
- to: wired
conditions:
- !type:AllWiresCut {}
- !type:WirePanel {}
- !type:ContainerNotEmpty
container: board
completed:
- !type:EmptyAllContainers {}
steps:
- tool: Prying
doAfter: 1
- type: constructionGraph
id: fire_alarm
start: start
graph:
- node: start
edges:
- to: assembly
steps:
- material: Steel
amount: 2
doAfter: 2.0
- node: assembly
entity: FireAlarmAssembly
actions:
- !type:SpriteStateChange
state: fire_b1
edges:
- to: wired
steps:
- material: Cable
amount: 2
doAfter: 1
- to: start
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 2
- !type:DeleteEntity {}
steps:
- tool: Welding
doAfter: 2
- node: wired
entity: FireAlarmAssembly
edges:
- to: electronics
steps:
- tag: FireAlarmElectronics
store: board
name: "fire alarm electronics"
icon:
sprite: "Objects/Misc/module.rsi"
state: "door_electronics" # /tg/ uses the same sprite, right?
doAfter: 1
- to: assembly
completed:
- !type:SpawnPrototype
prototype: CableApcStack1
amount: 2
steps:
- tool: Cutting
doAfter: 1
- node: electronics
actions:
- !type:SpriteStateChange
state: fire_b2
edges:
- to: fire_alarm
steps:
- tool: Screwing
doAfter: 2
- node: fire_alarm
entity: FireAlarm
edges:
- to: wired
conditions:
- !type:AllWiresCut {}
- !type:WirePanel {}
- !type:ContainerNotEmpty
container: board
completed:
- !type:EmptyAllContainers {}
steps:
- tool: Prying
doAfter: 1

View File

@@ -0,0 +1,35 @@
- type: construction
name: air alarm
id: AirAlarmFixture
graph: air_alarm
startNode: start
targetNode: air_alarm
category: Structures
description: An air alarm. Alarms... air?
icon:
sprite: Structures/Wallmounts/air_monitors.rsi
state: alarm0
placementMode: SnapgridCenter
objectType: Structure
canRotate: true
canBuildInImpassable: true
conditions:
- !type:WallmountCondition {}
- type: construction
name: fire alarm
id: FireAlarm
graph: fire_alarm
startNode: start
targetNode: fire_alarm
category: Structures
description: A fire alarm. Spicy!
icon:
sprite: Structures/Wallmounts/air_monitors.rsi
state: fire0
placementMode: SnapgridCenter
objectType: Structure
canRotate: true
canBuildInImpassable: true
conditions:
- !type:WallmountCondition {}

View File

@@ -1,5 +1,8 @@
# Alphabetical order is now apparently required.
- type: Tag
id: AirAlarmElectronics
- type: Tag
id: Baguette
@@ -108,6 +111,9 @@
- type: Tag
id: ExplosivePassable
- type: Tag
id: FireAlarmElectronics
- type: Tag
id: FireAxe