Adds the thermo-electric generator (#18840)

* Basic TEG start.

Connects via node group.

* Basic TEG test map

* Sensor monitoring basics, TEG circulator flow

* Basic power generation (it doesn't work)

* More sensor monitoring work

* Battery (SMES) monitoring system.

* Sensor monitoring fixes

Make it work properly when mapped.

* Test map improvements

* Revise TEG power output mechanism.

Now uses a fixed supplier with a custom ramping system.

* TEG test map fixes

* Make air alarms and pumps open UI on activate.

* Clean up thermo machines power switch.

Removed separate Enabled bool from the component that always matched the power receiver's state.

This enables adding a PowerSwitch component to give us alt click/verb menu.

* TEG but now fancy

* Make sensor monitoring console obviously WiP to mappers.

* Vending machine sound, because of course.

* Terrible, terrible graph background color

* Examine improvements for the TEG.

* Account for electrical power when equalizing gas mixtures.

* Get rid of the TegCirculatorArrow logic.

Use TimedDespawn instead. The "no show in right-click menuu" goes into a new general-purpose component.

Thanks Julian.

* Put big notice of "not ready, here's why" on the sensor monitoring console.

* TryGetComponent -> TryComp

* Lol there's a HideContextMenu tag

* Test fixes

* Guidebook for TEG

Fixed rotation on GuideEntityEmbed not working correctly.

Added Margin property to GuideEntityEmbed

* Make TEG power bar default to invisible.

So it doesn't appear in the guidebook and spawn menu.
This commit is contained in:
Pieter-Jan Briers
2023-08-12 22:41:55 +02:00
committed by GitHub
parent 61bf951ec4
commit a242af506e
74 changed files with 5546 additions and 22 deletions

View File

@@ -377,3 +377,14 @@
price: 150
- type: ComputerBoard
prototype: ComputerMassMedia
- type: entity
parent: BaseComputerCircuitboard
id: SensorConsoleCircuitboard
name: sensor monitoring console board
description: A computer printed circuit board for a sensor monitoring console.
components:
- type: Sprite
state: cpu_engineering
- type: ComputerBoard
prototype: ComputerSensorMonitoring

View File

@@ -0,0 +1,11 @@
# Station prototype for cut-down test maps that don't need all the infrastructure.
- type: entity
id: TestStation
parent:
- BaseStation
- BaseStationJobsSpawning
- BaseStationRecords
- BaseStationAlertLevels
noSpawn: true
components:
- type: Transform

View File

@@ -972,3 +972,46 @@
interfaces:
- key: enum.NewsWriteUiKey.Key
type: NewsWriteBoundUserInterface
- type: entity
parent: BaseComputer
id: ComputerSensorMonitoring
name: sensor monitoring computer
description: A flexible console for monitoring all kinds of sensors.
# Putting this as "DO NOT MAP" until the performance issues are fixed.
# And it's more fleshed out.
suffix: TESTING, DO NOT MAP
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: sensors
- map: ["computerLayerKeys"]
state: atmos_key
- type: PointLight
radius: 1.5
energy: 1.6
color: "#43ccb5"
- type: Computer
board: SensorConsoleCircuitboard
- type: SensorMonitoringConsole
- type: ActivatableUI
key: enum.SensorMonitoringConsoleUiKey.Key
- type: UserInterface
interfaces:
- key: enum.SensorMonitoringConsoleUiKey.Key
type: SensorMonitoringConsoleBoundUserInterface
- type: DeviceNetwork
deviceNetId: AtmosDevices
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
prefix: device-address-prefix-sensor-monitor
sendBroadcastAttemptEvent: true
examinableAddress: true
- type: WiredNetworkConnection
- type: DeviceList
- type: AtmosDevice

View File

@@ -102,6 +102,14 @@
range: 5
sound:
path: /Audio/Ambience/Objects/gas_pump.ogg
- type: DeviceNetwork
deviceNetId: AtmosDevices
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
sendBroadcastAttemptEvent: true
examinableAddress: true
prefix: device-address-prefix-volume-pump
- type: WiredNetworkConnection
- type: entity
parent: GasBinaryBase

View File

@@ -250,6 +250,14 @@
pipeDirection: South
- type: Transform
noRot: false
- type: DeviceNetwork
deviceNetId: AtmosDevices
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
sendBroadcastAttemptEvent: true
examinableAddress: true
- type: WiredNetworkConnection
- type: PowerSwitch
- type: entity
parent: BaseGasThermoMachine
@@ -281,6 +289,8 @@
powerDisabled: true #starts off
- type: Machine
board: ThermomachineFreezerMachineCircuitBoard
- type: DeviceNetwork
prefix: device-address-prefix-freezer
- type: entity
parent: GasThermoMachineFreezer
@@ -322,6 +332,8 @@
powerDisabled: true #starts off
- type: Machine
board: ThermomachineHeaterMachineCircuitBoard
- type: DeviceNetwork
prefix: device-address-prefix-heater
- type: entity
parent: GasThermoMachineHeater

View File

@@ -0,0 +1,189 @@
- type: entity
id: TegCenter
name: thermo-electric generator
description: A high efficiency generator that uses energy transfer between hot and cold gases to produce electricity.
parent: BaseMachinePowered
placement:
mode: SnapgridCenter
components:
- type: Transform
noRot: false
- type: Sprite
sprite: Structures/Power/Generation/teg.rsi
layers:
- state: teg
- state: teg_mid
shader: unshaded
map: [ "enum.PowerDeviceVisualLayers.Powered" ]
- state: teg-op1
shader: unshaded
visible: false
map: [ "enum.TegVisualLayers.PowerOutput" ]
- type: GenericVisualizer
visuals:
enum.PowerDeviceVisuals.Powered:
enum.PowerDeviceVisualLayers.Powered:
True: { visible: true }
False: { visible: false }
enum.TegVisuals.PowerOutput:
enum.TegVisualLayers.PowerOutput:
0: { visible: false }
1: { visible: true, state: teg-op1 }
2: { visible: true, state: teg-op2 }
3: { visible: true, state: teg-op3 }
4: { visible: true, state: teg-op4 }
5: { visible: true, state: teg-op5 }
6: { visible: true, state: teg-op6 }
7: { visible: true, state: teg-op7 }
8: { visible: true, state: teg-op8 }
9: { visible: true, state: teg-op9 }
10: { visible: true, state: teg-op10 }
11: { visible: true, state: teg-op11 }
- type: Anchorable
- type: Pullable
- type: NodeContainer
examinable: true
nodes:
output:
!type:CableDeviceNode
nodeGroupID: HVPower
teg:
!type:TegNodeGenerator
nodeGroupID: Teg
- type: Rotatable
# Note that only the TEG center is an AtmosDevice.
# It fires processing on behalf of its connected circulators.
- type: AtmosDevice
- type: TegGenerator
- type: DeviceNetwork
deviceNetId: AtmosDevices
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
prefix: device-address-prefix-teg
sendBroadcastAttemptEvent: true
examinableAddress: true
- type: WiredNetworkConnection
- type: PowerSupplier
# Have practically irrelevant supply ramping.
# Ramping is effectively implemented by the TEG manually,
# due to how power output is handled.
supplyRampRate: 100000000
supplyRampTolerance: 10000000000
- type: Appearance
- type: ApcPowerReceiver
powerLoad: 1000
- type: LitOnPowered
- type: PointLight
enabled: false
castShadows: false
radius: 1.5
color: "#FFAA00"
- type: AmbientSound
volume: -4
range: 6
enabled: false
sound:
path: /Audio/Ambience/Objects/vending_machine_hum.ogg
- type: entity
id: TegCirculator
name: circulator
description: Passes gas through the thermo-electric generator to exchange heat. Has an inlet and outlet port.
parent: BaseMachine
placement:
mode: SnapgridCenter
components:
- type: Transform
noRot: false
# visuals
- type: Sprite
sprite: Structures/Power/Generation/teg.rsi
layers:
- state: circ-0
map: [ "enum.TegVisualLayers.CirculatorBase" ]
- state: circ-0-light
shader: unshaded
map: [ "enum.TegVisualLayers.CirculatorLight" ]
- type: GenericVisualizer
visuals:
enum.TegVisuals.CirculatorPower:
enum.TegVisualLayers.CirculatorLight:
True: { visible: true }
False: { visible: false }
enum.TegVisuals.CirculatorSpeed:
enum.TegVisualLayers.CirculatorBase:
SpeedStill: { state: circ-0 }
SpeedSlow: { state: circ-1 }
SpeedFast: { state: circ-2 }
enum.TegVisualLayers.CirculatorLight:
SpeedStill: { state: circ-0-light }
SpeedSlow: { state: circ-1-light }
SpeedFast: { state: circ-2-light }
- type: Appearance
- type: PointLight
enabled: false
castShadows: false
radius: 1.5
color: "#CC00FF"
# tags
- type: Tag
tags:
- Pipe
- Unstackable
# basic interactions
- type: Rotatable
- type: Anchorable
- type: Pullable
# functionality
- type: NodeContainer
nodes:
inlet:
!type:PipeNode
nodeGroupID: Pipe
pipeDirection: North
volume: 100
outlet:
!type:PipeNode
nodeGroupID: Pipe
pipeDirection: South
volume: 100
circulator:
!type:TegNodeCirculator
nodeGroupID: Teg
- type: AtmosUnsafeUnanchor
- type: TegCirculator
light_color_fast: '#AA00FF'
light_color_slow: '#FF3300'
- # Spawned by the client-side circulator examine code to indicate the inlet/outlet direction.
type: entity
id: TegCirculatorArrow
noSpawn: true
components:
- type: Sprite
sprite: Markers/teg_arrow.rsi
color: "#FFFFFFBB"
layers:
- state: arrow
offset: 0, 0.75
- state: arrow
offset: 0, -0.75
- type: TimedDespawn
lifetime: 2
- type: Tag
tags:
- HideContextMenu

View File

@@ -78,6 +78,15 @@
- type: Damageable
damageContainer: Inorganic
damageModifierSet: StrongMetallic
- type: BatterySensor
- type: DeviceNetwork
deviceNetId: AtmosDevices
receiveFrequencyId: AtmosMonitor
transmitFrequencyId: AtmosMonitor
prefix: device-address-prefix-smes
sendBroadcastAttemptEvent: true
examinableAddress: true
- type: WiredNetworkConnection
# SMES' in use

View File

@@ -51,13 +51,19 @@
children:
- AME
- Singularity
- TEG
- type: guideEntry
id: AME
name: guide-entry-ame
text: "/ServerInfo/Guidebook/Engineering/AME.xml"
- type: guideEntry
id: Singularity
name: guide-entry-singularity
text: "/ServerInfo/Guidebook/Engineering/Singularity.xml"
- type: guideEntry
id: TEG
name: guide-entry-teg
text: "/ServerInfo/Guidebook/Engineering/TEG.xml"

View File

@@ -31,3 +31,20 @@
- Captain
availableJobs:
Captain: [ -1, -1 ]
- type: gameMap
id: TestTeg
mapName: Test TEG
mapPath: /Maps/Test/test_teg.yml
minPlayers: 0
stations:
TEG:
stationProto: TestStation
components:
- type: StationNameSetup
mapNameTemplate: "TEG"
- type: StationJobs
overflowJobs:
- ChiefEngineer
availableJobs:
ChiefEngineer: [ -1, -1 ]