Power monitoring console overhaul (#20927)

* Prototyping whole station wire map

* More prototyping

* Added icons for the different power distributors and toggleable cable displays

* Power cable layouts are now only sent to the client when the power monitor is open

* UI prototyping

* Power monitors can now see the sprites of distant entities, long entity names are truncated

* Updated how network devices are added to the player's PVS

* More feature prototypes

* Added source / load symbols

* Final prototype! Time to actually code it properly...

* Start of code clean up

* Continuing code clean up

* Fixed UI appearance

* Code clean up complete

* Removed unnecessary changes

* Updated how power values are calculated, added UI warnings for power sinks and power net checks

* Updated how power values are calculated again, added support for portable generators

* Removed unnecessary files

* Map beacons start toggled off, console map now works outside the station, fixed substation icon

* Made some of Sloth's requested changes. Power distributors don't blink anymore, unless selected

* Moved a number of static variables in PowerMonitoringHelper to sensible places in the main files. Added a NavMapTrackableComponent so that you can specify how individual entities appear on the navmap

* Updated the colors/positions of HV cables and SMESes to improve contrast

* Fixed SMES color in map legend

* Partially fixed auto-scrolling on device selection, made sublists alphabetical

* Changed how auto-scroll is handled

* Changed the font color of the console warning messages

* Reduced the font size of beacon labels

* Added the station name to the console

* Organized references

* Removed unwanted changes to RobustToolbox

* Fix merge conflict

* Fix merge conflict, maybe

* Fix merge conflict

* Updated outdated reference

* Fixed portable_generator.yml

* Implemented a number of requested changes, move bit masks to a shared component

* Navigate listings via the navmap

* First attempt at improving efficiency

* Second attempt at optimization, entity grouping added for solar panels

* Finished solar panel entity joining

* Finished major revisions, code clean up needed

* Finializing optimizations

* Made requested changes

* Bug fix, removed obsolete code

* Bug fixes

* Bug fixes

* STarted revisions

* Further revisions

* More revision

* Finalizing revisions. Need to make RT PR

* Code tidying

* More code tidying

* Trying to avoid merge conflicts

* Trying to avoid merge conflicts

* Removed use of PVS

* Improving efficiency

* Addressed a bunch of outstanding issues

* Clear old data on console refresh

* UI adjustments

* Made node comparison more robust. More devices can be combined into one entry

* Added missing component 'dirty'
This commit is contained in:
chromiumboy
2023-12-24 00:07:41 -06:00
committed by GitHub
parent e6b52cc294
commit 1de682e23f
55 changed files with 2719 additions and 220 deletions

View File

@@ -239,6 +239,7 @@
- type: Computer
board: PowerComputerCircuitboard
- type: PowerMonitoringConsole
- type: PowerMonitoringCableNetworks
- type: NodeContainer
examinable: true
nodes:
@@ -246,6 +247,7 @@
!type:CableDeviceNode
nodeGroupID: HVPower
- type: ActivatableUI
singleUser: true
key: enum.PowerMonitoringConsoleUiKey.Key
- type: UserInterface
interfaces:

View File

@@ -50,6 +50,12 @@
input:
!type:CableDeviceNode
nodeGroupID: HVPower
- type: PowerMonitoringDevice
group: Generator
loadNode: input
collectionName: radiationCollector
sprite: Structures/Power/Generation/Singularity/collector.rsi
state: static
- type: RadiationCollector
chargeModifier: 7500
radiationReactiveGases:

View File

@@ -78,8 +78,11 @@
input:
!type:CableDeviceNode
nodeGroupID: HVPower
# - type: ApcPowerReceiver
# - type: ExtensionCableReceiver
- type: PowerMonitoringDevice
group: Generator
loadNode: input
sprite: Structures/Power/Generation/ame.rsi
state: static
- type: PowerSupplier
supplyRate: 0
- type: ContainerContainer

View File

@@ -40,6 +40,11 @@
output:
!type:CableDeviceNode
nodeGroupID: HVPower
- type: PowerMonitoringDevice
group: Generator
loadNode: output
sprite: Structures/Power/power.rsi
state: generator
- type: PowerSupplier
supplyRate: 3000
supplyRampRate: 500
@@ -124,6 +129,11 @@
output:
!type:CableDeviceNode
nodeGroupID: HVPower
- type: PowerMonitoringDevice
group: Generator
loadNode: output
sprite: Structures/Power/Generation/wallmount_generator.rsi
state: static
- type: PowerSupplier
supplyRate: 3000
supplyRampRate: 500
@@ -229,6 +239,9 @@
- type: Sprite
sprite: Structures/Power/Generation/rtg.rsi
state: rtg
- type: PowerMonitoringDevice
sprite: Structures/Power/Generation/rtg.rsi
state: rtg
- type: AmbientSound
range: 5
sound:
@@ -272,6 +285,9 @@
layers:
- state: rtg_damaged
- state: rtg_glow
- type: PowerMonitoringDevice
sprite: Structures/Power/Generation/rtg.rsi
state: rtg_damaged
- type: RadiationSource # ideally only when opened.
intensity: 2
- type: Destructible

View File

@@ -170,7 +170,14 @@
gasType: CarbonDioxide
# 2 moles of gas for every sheet of plasma.
moleRatio: 2
- type: PowerMonitoringDevice
group: Generator
loadNodes:
- output_hv
- output_mv
sprite: Structures/Power/Generation/portable_generator.rsi
state: portgen0
- type: entity
name: S.U.P.E.R.P.A.C.M.A.N.-type portable generator
description: |-
@@ -219,7 +226,14 @@
- type: UpgradePowerSupplier
powerSupplyMultiplier: 1.25
scaling: Exponential
- type: PowerMonitoringDevice
group: Generator
loadNodes:
- output_hv
- output_mv
sprite: Structures/Power/Generation/portable_generator.rsi
state: portgen1
- type: entity
name: J.R.P.A.C.M.A.N.-type portable generator
description: |-
@@ -293,7 +307,12 @@
nodes:
output:
!type:CableDeviceNode
nodeGroupID: Apc
nodeGroupID: Apc
- type: PowerMonitoringDevice
group: Generator
loadNode: output
sprite: Structures/Power/Generation/portable_generator.rsi
state: portgen3
- type: PowerSupplier
# No ramping needed on this bugger.
voltage: Apc

View File

@@ -36,6 +36,12 @@
output:
!type:CableDeviceNode
nodeGroupID: HVPower
- type: PowerMonitoringDevice
group: Generator
loadNode: output
sprite: Structures/Power/Generation/solar_panel.rsi
state: static
collectionName: SolarPanel
- type: Anchorable
- type: Pullable
- type: Electrified

View File

@@ -51,6 +51,11 @@
teg:
!type:TegNodeGenerator
nodeGroupID: Teg
- type: PowerMonitoringDevice
group: Generator
loadNode: output
sprite: Structures/Power/Generation/teg.rsi
state: static
- type: Rotatable
# Note that only the TEG center is an AtmosDevice.

View File

@@ -65,6 +65,13 @@
output:
!type:CableDeviceNode
nodeGroupID: Apc
- type: PowerMonitoringDevice
group: APC
sourceNode: input
loadNode: output
collectionName: apc
sprite: Structures/Power/apc.rsi
state: static
- type: BatteryCharger
voltage: Medium
- type: PowerProvider

View File

@@ -43,15 +43,22 @@
examinable: true
nodes:
input:
!type:CableDeviceNode
nodeGroupID: HVPower
output:
!type:CableTerminalPortNode
nodeGroupID: HVPower
- type: BatteryCharger
output:
!type:CableDeviceNode
nodeGroupID: HVPower
- type: PowerMonitoringDevice
group: SMES
sourceNode: input
loadNode: output
collectionName: smes
sprite: Structures/Power/smes.rsi
state: static
- type: BatteryDischarger
voltage: High
node: output
- type: BatteryDischarger
- type: BatteryCharger
voltage: High
node: input
- type: PowerNetworkBattery

View File

@@ -40,6 +40,13 @@
output:
!type:CableDeviceNode
nodeGroupID: MVPower
- type: PowerMonitoringDevice
group: Substation
sourceNode: input
loadNode: output
collectionName: substation
sprite: Structures/Power/substation.rsi
state: substation_static
- type: BatteryCharger
voltage: High
- type: BatteryDischarger
@@ -166,6 +173,12 @@
output:
!type:CableDeviceNode
nodeGroupID: MVPower
- type: PowerMonitoringDevice
group: Substation
sourceNode: input
loadNode: output
sprite: Structures/Power/substation.rsi
state: substation_wall_static
- type: BatteryCharger
voltage: High
- type: BatteryDischarger