Add door electronics access configuration menu (#17778)

* Add door electronics configuration menu

* Use file-scoped namespaces

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Open door electronics configuration menu only with network configurator

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Doors will now try to move their AccessReaderComponent to their door electronics when the map is initialized

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Make the access list in the id card computer a separate control

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix merge conflict

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove DoorElectronics tag

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Integrate doors with #17927

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Move door electornics ui stuff to the right place

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Some review fixes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* More fixes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* review fix

Signed-off-by: c4llv07e <kseandi@gmail.com>

* move all accesses from airlock prototypes to door electronics

Signed-off-by: c4llv07e <kseandi@gmail.com>

* rework door electronics config access list

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove Linq from the door electronics user interface

* [WIP] Add EntityWhitelist to the activatable ui component

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Better interaction system

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Refactor

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix some door electronics not working without AccessReaderComponent

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Move AccessReaderComponent update code to the AccessReaderSystem

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unnecesary newlines in the door access prototypes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unused variables in access level control

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unnecessary method from the door electronics configuration menu

Signed-off-by: c4llv07e <kseandi@gmail.com>

* [WIP] change access type from string to ProtoId<AccessLevelPrototype>

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unused methods

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Newline fix

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Restored to a functional state

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix access configurator not working with door electronics AccessReaderComponent

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Replace all string access fields with ProtoId

Signed-off-by: c4llv07e <kseandi@gmail.com>

* move access level control initialization into Populate method

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Review

---------

Signed-off-by: c4llv07e <kseandi@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
c4llv07e
2024-04-01 09:06:13 +03:00
committed by GitHub
parent 72bdcac1e2
commit 64bb8dbdd5
40 changed files with 1079 additions and 532 deletions

View File

@@ -7,9 +7,19 @@
- type: Sprite
sprite: Objects/Misc/module.rsi
state: door_electronics
- type: AccessReader
- type: Tag
tags:
- DoorElectronics
- type: DoorElectronics
- type: StaticPrice
price: 55
- type: AccessReader
- type: ActivatableUI
key: enum.DoorElectronicsConfigurationUiKey.Key
allowedItems:
tags:
- Multitool
- type: UserInterface
interfaces:
- key: enum.DoorElectronicsConfigurationUiKey.Key
type: DoorElectronicsBoundUserInterface

View File

@@ -0,0 +1,264 @@
- type: entity
parent: DoorElectronics
id: DoorElectronicsService
suffix: Service, Locked
components:
- type: AccessReader
access: [["Service"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsTheatre
suffix: Theatre, Locked
components:
- type: AccessReader
access: [["Theatre"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsChapel
suffix: Chapel, Locked
components:
- type: AccessReader
access: [["Chapel"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsJanitor
suffix: Janitor, Locked
components:
- type: AccessReader
access: [["Janitor"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsKitchen
suffix: Kitchen, Locked
components:
- type: AccessReader
access: [["Kitchen"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsBar
suffix: Bar, Locked
components:
- type: AccessReader
access: [["Bar"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsHydroponics
suffix: Hydroponics, Locked
components:
- type: AccessReader
access: [["Hydroponics"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsCaptain
suffix: Captain, Locked
components:
- type: AccessReader
access: [["Captain"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsExternal
suffix: External, Locked
components:
- type: AccessReader
access: [["External"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsCargo
suffix: Cargo, Locked
components:
- type: AccessReader
access: [["Cargo"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsEngineering
suffix: Engineering, Locked
components:
- type: AccessReader
access: [["Engineering"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsAtmospherics
suffix: Atmospherics, Locked
components:
- type: AccessReader
access: [["Atmospherics"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsFreezer
suffix: Freezer, Locked
components:
- type: AccessReader
access: [["Kitchen"], ["Hydroponics"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsSalvage
suffix: Salvage, Locked
components:
- type: AccessReader
access: [["Salvage"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsMedical
suffix: Medical, Locked
components:
- type: AccessReader
access: [["Medical"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsChemistry
suffix: Chemistry, Locked
components:
- type: AccessReader
access: [["Chemistry"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsResearch
suffix: Research, Locked
components:
- type: AccessReader
access: [["Research"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsScience
suffix: Science, Locked
components:
- type: AccessReader
access: [["Research"], ["Medical"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsCommand
suffix: Command, Locked
components:
- type: AccessReader
access: [["Command"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsChiefMedicalOfficer
suffix: ChiefMedicalOfficer, Locked
components:
- type: AccessReader
access: [["ChiefMedicalOfficer"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsChiefEngineer
suffix: ChiefEngineer, Locked
components:
- type: AccessReader
access: [["ChiefEngineer"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsHeadOfSecurity
suffix: HeadOfSecurity, Locked
components:
- type: AccessReader
access: [["HeadOfSecurity"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsResearchDirector
suffix: ResearchDirector, Locked
components:
- type: AccessReader
access: [["ResearchDirector"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsHeadOfPersonnel
suffix: HeadOfPersonnel, Locked
components:
- type: AccessReader
access: [["HeadOfPersonnel"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsQuartermaster
suffix: Quartermaster, Locked
components:
- type: AccessReader
access: [["Quartermaster"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsSecurity
suffix: Security, Locked
components:
- type: AccessReader
access: [["Security"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsDetective
suffix: Detective, Locked
components:
- type: AccessReader
access: [["Detective"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsBrig
suffix: Brig, Locked
components:
- type: AccessReader
access: [["Brig"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsArmory
suffix: Armory, Locked
components:
- type: AccessReader
access: [["Armory"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsVault
suffix: Vault, Locked
components:
- type: AccessReader
access: [["Security", "Command"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsMaintenance
suffix: Maintenance, Locked
components:
- type: AccessReader
access: [["Maintenance"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsSyndicateAgent
suffix: SyndicateAgent, Locked
components:
- type: AccessReader
access: [["SyndicateAgent"]]
- type: entity
parent: DoorElectronics
id: DoorElectronicsRnDMed
suffix: Medical/Science, Locked
components:
- type: AccessReader
access: [["Research"], ["Medical"]]

View File

@@ -48,6 +48,8 @@
- type: ContainerFill
containers:
board: [ DoorElectronics ]
- type: AccessReader
containerAccessProvider: board
- type: Door
crushDamage:
types:
@@ -140,7 +142,6 @@
- type: PaintableAirlock
group: Standard
department: Civilian
- type: AccessReader
- type: StaticPrice
price: 150
- type: LightningTarget

View File

@@ -60,6 +60,7 @@
- type: NavMapDoor
- type: DoorBolt
- type: AccessReader
containerAccessProvider: board
- type: Appearance
- type: WiresVisuals
- type: ApcPowerReceiver

View File

@@ -46,7 +46,7 @@
conditions:
- !type:EntityAnchored {}
steps:
- tag: DoorElectronics
- component: DoorElectronics
store: board
name: "door electronics circuit board"
icon:

View File

@@ -44,7 +44,7 @@
- !type:EntityAnchored
anchored: true
steps:
- tag: DoorElectronics
- component: DoorElectronics
name: Door Electronics
icon:
sprite: "Objects/Misc/module.rsi"

View File

@@ -23,7 +23,7 @@
conditions:
- !type:EntityAnchored {}
steps:
- tag: DoorElectronics
- component: DoorElectronics
store: board
name: "door electronics circuit board"
icon:

View File

@@ -107,7 +107,7 @@
conditions:
- !type:EntityAnchored {}
steps:
- tag: DoorElectronics
- component: DoorElectronics
store: board
name: "door electronics circuit board"
icon:
@@ -378,7 +378,7 @@
conditions:
- !type:EntityAnchored { }
steps:
- tag: DoorElectronics
- component: DoorElectronics
store: board
name: "door electronics circuit board"
icon: