Access refactor

Access is now done through a list of access lists, instead of the necessary/sufficient system that was extremely confusing.

Added a "deny" list so you can screw over sec.

Cleaned the API up so it all uses sets and such.

PDA now relays access read-only to fix edge cases.
This commit is contained in:
Pieter-Jan Briers
2020-06-03 11:46:59 +02:00
parent 49d96e3575
commit 0f43e5e6ad
11 changed files with 424 additions and 151 deletions
+49 -49
View File
@@ -7484,8 +7484,8 @@ entities:
pos: 6.5,17.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- HeadOfPersonnel
- access:
- - HeadOfPersonnel
type: AccessReader
- uid: 1042
type: reinforced_wall
@@ -22369,8 +22369,8 @@ entities:
pos: 5.5,25.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Captain
- access:
- - Captain
type: AccessReader
- uid: 2893
type: AirlockMaintCommonLocked
@@ -22527,9 +22527,9 @@ entities:
pos: 38.5,1.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Engineering
- Command
- access:
- - Engineering
- Command
type: AccessReader
- uid: 2912
type: Catwalk
@@ -22545,8 +22545,8 @@ entities:
pos: 11.5,20.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- HeadOfPersonnel
- access:
- - HeadOfPersonnel
type: AccessReader
- uid: 2914
type: AirlockExternalLocked
@@ -22601,8 +22601,8 @@ entities:
pos: -8.5,-7.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Service
- access:
- - Service
type: AccessReader
- uid: 2921
type: AirlockServiceGlassLocked
@@ -22687,8 +22687,8 @@ entities:
pos: -20.5,11.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Janitor
- access:
- - Janitor
type: AccessReader
- uid: 2932
type: AirlockEngineeringGlassLocked
@@ -22735,9 +22735,9 @@ entities:
pos: 20.5,-13.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Medical
- Command
- access:
- - Medical
- Command
type: AccessReader
- uid: 2937
type: AirlockCommandGlassLocked
@@ -22748,9 +22748,9 @@ entities:
pos: -8.5,-21.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Research
- Command
- access:
- - Research
- Command
type: AccessReader
- uid: 2938
type: AirlockCommandGlassLocked
@@ -22761,9 +22761,9 @@ entities:
pos: -3.5,-21.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Research
- Command
- access:
- - Research
- Command
type: AccessReader
- uid: 2939
type: AirlockScienceLocked
@@ -22801,8 +22801,8 @@ entities:
pos: -25.5,10.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Maintenance
- access:
- - Maintenance
type: AccessReader
- uid: 2943
type: AirlockServiceGlassLocked
@@ -22813,8 +22813,8 @@ entities:
pos: -25.5,8.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Maintenance
- access:
- - Maintenance
type: AccessReader
- uid: 2944
type: AirlockGlass
@@ -22834,8 +22834,8 @@ entities:
pos: -20.5,-7.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Theatre
- access:
- - Theatre
type: AccessReader
- uid: 2946
type: Airlock
@@ -22889,8 +22889,8 @@ entities:
pos: -14.5,-4.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Service
- access:
- - Service
type: AccessReader
- uid: 2952
type: AirlockMaintCommonLocked
@@ -22899,8 +22899,8 @@ entities:
pos: -16.5,-7.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Service
- access:
- - Service
type: AccessReader
- uid: 2953
type: AirlockMaintCommonLocked
@@ -23002,8 +23002,8 @@ entities:
pos: 7.5,6.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- External
- access:
- - External
type: AccessReader
- uid: 2966
type: AirlockCommandGlassLocked
@@ -23014,8 +23014,8 @@ entities:
pos: 9.5,6.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- External
- access:
- - External
type: AccessReader
- uid: 2967
type: AirlockMaintCommandLocked
@@ -23024,8 +23024,8 @@ entities:
pos: 8.5,12.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- External
- access:
- - External
type: AccessReader
- uid: 2968
type: AirlockCargoGlassLocked
@@ -23063,8 +23063,8 @@ entities:
pos: 20.5,14.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Cargo
- access:
- - Cargo
type: AccessReader
- uid: 2972
type: AirlockExternalLocked
@@ -23075,8 +23075,8 @@ entities:
pos: 20.5,16.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Cargo
- access:
- - Cargo
type: AccessReader
- uid: 2973
type: AirlockExternalLocked
@@ -23087,8 +23087,8 @@ entities:
pos: 22.5,16.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Cargo
- access:
- - Cargo
type: AccessReader
- uid: 2974
type: AirlockExternalLocked
@@ -23099,8 +23099,8 @@ entities:
pos: 22.5,14.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Cargo
- access:
- - Cargo
type: AccessReader
- uid: 2975
type: AirlockExternalLocked
@@ -23118,9 +23118,9 @@ entities:
pos: -8.5,18.5
rot: -1.5707963267948966 rad
type: Transform
- necessary:
- Security
- Command
- access:
- - Security
- Command
type: AccessReader
- uid: 2977
type: Poweredlight
@@ -5,7 +5,7 @@
suffix: Service, Locked
components:
- type: AccessReader
necessary: ["Service"]
access: [["Service"]]
- type: entity
parent: AirlockExternal
@@ -13,7 +13,7 @@
suffix: External, Locked
components:
- type: AccessReader
necessary: ["External"]
access: [["External"]]
- type: entity
parent: AirlockEngineering
@@ -21,7 +21,7 @@
suffix: Engineering, Locked
components:
- type: AccessReader
necessary: ["Engineering"]
access: [["Engineering"]]
- type: entity
parent: AirlockCargo
@@ -29,7 +29,7 @@
suffix: Cargo, Locked
components:
- type: AccessReader
necessary: ["Cargo"]
access: [["Cargo"]]
- type: entity
parent: AirlockMedical
@@ -37,7 +37,7 @@
suffix: Medical, Locked
components:
- type: AccessReader
necessary: ["Medical"]
access: [["Medical"]]
- type: entity
parent: AirlockScience
@@ -45,7 +45,7 @@
suffix: Science, Locked
components:
- type: AccessReader
necessary: ["Research"]
access: [["Research"]]
- type: entity
parent: AirlockCommand
@@ -53,7 +53,7 @@
suffix: Command, Locked
components:
- type: AccessReader
necessary: ["Command"]
access: [["Command"]]
- type: entity
parent: AirlockSecurity
@@ -61,7 +61,7 @@
suffix: Security, Locked
components:
- type: AccessReader
necessary: ["Security"]
access: [["Security"]]
- type: entity
parent: AirlockSecurity
@@ -69,7 +69,7 @@
suffix: Vault, Locked
components:
- type: AccessReader
necessary: ["Security", "Command"]
access: [["Security", "Command"]]
- type: entity
parent: AirlockCommand
@@ -77,7 +77,7 @@
suffix: EVA, Locked
components:
- type: AccessReader
necessary: ["External"]
access: [["External"]]
# Glass Airlocks
- type: entity
@@ -86,7 +86,7 @@
suffix: Service, Locked
components:
- type: AccessReader
necessary: ["Service"]
access: [["Service"]]
- type: entity
parent: AirlockEngineeringGlass
@@ -94,7 +94,7 @@
suffix: Glass, Locked
components:
- type: AccessReader
necessary: ["Engineering"]
access: [["Engineering"]]
- type: entity
parent: AirlockCargoGlass
@@ -102,7 +102,7 @@
suffix: Cargo, Locked
components:
- type: AccessReader
necessary: ["Cargo"]
access: [["Cargo"]]
- type: entity
parent: AirlockMedicalGlass
@@ -110,7 +110,7 @@
suffix: Medical, Locked
components:
- type: AccessReader
necessary: ["Medical"]
access: [["Medical"]]
- type: entity
parent: AirlockScienceGlass
@@ -118,7 +118,7 @@
suffix: Science, Locked
components:
- type: AccessReader
necessary: ["Research"]
access: [["Research"]]
- type: entity
parent: AirlockCommandGlass
@@ -126,7 +126,7 @@
suffix: Command, Locked
components:
- type: AccessReader
necessary: ["Command"]
access: [["Command"]]
- type: entity
parent: AirlockSecurityGlass
@@ -134,7 +134,7 @@
suffix: Security, Locked
components:
- type: AccessReader
necessary: ["Security"]
access: [["Security"]]
# Maintenance Hatchs
- type: entity
@@ -143,7 +143,7 @@
suffix: Locked
components:
- type: AccessReader
necessary: ["Maintenance"]
access: [["Maintenance"]]
- type: entity
parent: AirlockMaintCargo
@@ -151,7 +151,7 @@
suffix: Cargo, Locked
components:
- type: AccessReader
necessary: ["Cargo", "Maintenance"]
access: [["Cargo"]]
- type: entity
parent: AirlockMaintCommand
@@ -159,7 +159,7 @@
suffix: Command, Locked
components:
- type: AccessReader
necessary: ["Command", "Maintenance"]
access: [["Command"]]
- type: entity
parent: AirlockMaintCommon
@@ -167,7 +167,7 @@
suffix: Common, Locked
components:
- type: AccessReader
necessary: ["Maintenance"]
access: [["Maintenance"]]
- type: entity
parent: AirlockMaintEngi
@@ -175,15 +175,15 @@
suffix: Engineering, Locked
components:
- type: AccessReader
necessary: ["Engineering", "Maintenance"]
access: [["Engineering"]]
- type: entity
parent: AirlockMaintInt
id: AirlockMaintIntLocked
suffix: Interior, Locked
components:
- type: AccessReader
necessary: ["Maintenance"]
access: [["Maintenance"]]
- type: entity
parent: AirlockMaintMed
@@ -191,7 +191,7 @@
suffix: Medical, Locked
components:
- type: AccessReader
necessary: ["Medical", "Maintenance"]
access: [["Medical"]]
- type: entity
parent: AirlockMaintRnD
@@ -199,7 +199,7 @@
suffix: RnD, Locked
components:
- type: AccessReader
necessary: ["Research", "Maintenance"]
access: [["Research"]]
- type: entity
parent: AirlockMaintSec
@@ -207,4 +207,4 @@
suffix: Security, Locked
components:
- type: AccessReader
necessary: ["Security", "Maintenance"]
access: [["Security"]]
@@ -158,7 +158,7 @@
name: ID Card Computer
components:
- type: AccessReader
necessary: ["HeadOfPersonnel"]
access: [["HeadOfPersonnel"]]
- type: IdCardConsole
- type: UserInterface
interfaces: