Activatable UI component (#5184)

* Transfer most Instrument UI logic to a new component, ActivatableUIComponent

* Move more ActivatableUIComponent stuff to ECS

* ActivatableUI component ignore on client

* ActivatableUI: Get rid of component interfaces where possible

* Add in adminOnly attribute for activatable UIs

This is so that porting #4926 to this will be easier

* Transition Solar Control Computer to ActivatableUI

* Move communications console to ActivatableUI

* Move cargo console to ActivatableUI

* Move ID card console to ActivatableUI

* ActivatableUI: Make things more amiable to entity tests adding components weirdly

* ActivatableUI: Use handling or lack thereof of events properly

* ActivatableUI: component dependency issue resolution stuffs

* ActivatableUISystem: Fix #5258

* More fixes because master did stuffo

* Check for HandDeselectedEvent again because otherwise active-hand check doesn't work

* Move just a bit more code into the system, introduce a workaround for #5258

* Purge the player status detection stuff

* Oh and some obsolete stuff too
This commit is contained in:
20kdc
2021-11-23 18:19:08 +00:00
committed by GitHub
parent b063209f99
commit f6d44be34f
20 changed files with 366 additions and 413 deletions

View File

@@ -5,7 +5,10 @@
description: That's an instrument.
components:
- type: Instrument
handheld: true
- type: ActivatableUI
inHandsOnly: true
singleUser: true
key: enum.InstrumentUiKey.Key
- type: UserInterface
interfaces:
- key: enum.InstrumentUiKey.Key

View File

@@ -5,7 +5,10 @@
abstract: true
components:
- type: Instrument
handheld: false
- type: ActivatableUI
inHandsOnly: false
singleUser: true
key: enum.InstrumentUiKey.Key
- type: InteractionOutline
- type: Rotatable
rotateWhileAnchored: true

View File

@@ -126,6 +126,9 @@
- type: AccessReader
access: [["HeadOfPersonnel"]]
- type: IdCardConsole
- type: ActivatableUI
key: enum.IdCardConsoleUiKey.Key
- type: ActivatableUIRequiresPower
- type: UserInterface
interfaces:
- key: enum.IdCardConsoleUiKey.Key
@@ -177,6 +180,9 @@
key: generic_key
screen: comm
- type: CommunicationsConsole
- type: ActivatableUI
key: enum.CommunicationsConsoleUiKey.Key
- type: ActivatableUIRequiresPower
- type: UserInterface
interfaces:
- key: enum.CommunicationsConsoleUiKey.Key
@@ -200,6 +206,9 @@
key: generic_key
screen: solar_screen
- type: SolarControlConsole
- type: ActivatableUI
key: enum.SolarControlConsoleUiKey.Key
- type: ActivatableUIRequiresPower
- type: UserInterface
interfaces:
- key: enum.SolarControlConsoleUiKey.Key
@@ -278,6 +287,9 @@
# - AtmosphericsWaterVapor
# - AtmosphericsPlasma
# - AtmosphericsTritium
- type: ActivatableUI
key: enum.CargoConsoleUiKey.Key
- type: ActivatableUIRequiresPower
- type: UserInterface
interfaces:
- key: enum.CargoConsoleUiKey.Key