Remove redundant access levels and jobs. (#3360)

We do not need access levels like ResearchDirector when Research | Command works fine.

We also do not need a QM.

Etc...
This commit is contained in:
Pieter-Jan Briers
2021-02-23 03:07:40 +01:00
committed by GitHub
parent 0f54a01d24
commit 6a79782fc0
24 changed files with 79 additions and 77 deletions

View File

@@ -6,9 +6,13 @@ using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.Interfaces;
using Content.Server.Interfaces.GameObjects.Components.Items;
using Content.Shared.Access;
using Content.Shared.GameObjects.Components.Inventory;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -103,6 +107,20 @@ namespace Content.Server.GameObjects.Components.Access
return Array.Empty<string>();
}
public override void Initialize()
{
base.Initialize();
var proto = IoCManager.Resolve<IPrototypeManager>();
foreach (var level in AccessLists.SelectMany(c => c).Union(DenyTags))
{
if (!proto.HasIndex<AccessLevelPrototype>(level))
{
Logger.ErrorS("access", $"Invalid access level: {level}");
}
}
}
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);

View File

@@ -1,5 +1,5 @@
- type: accessLevel
id: Quartermaster
#- type: accessLevel
# id: Quartermaster
- type: accessLevel
id: Cargo

View File

@@ -1,6 +1,6 @@
- type: accessLevel
id: ChiefEngineer
name: Chief Engineer
#- type: accessLevel
# id: ChiefEngineer
# name: Chief Engineer
- type: accessLevel
id: Engineering

View File

@@ -1,6 +1,6 @@
- type: accessLevel
id: ChiefMedicalOfficer
name: Chief Medical Officer
#- type: accessLevel
# id: ChiefMedicalOfficer
# name: Chief Medical Officer
- type: accessLevel
id: Medical

View File

@@ -1,6 +1,6 @@
- type: accessLevel
id: ResearchDirector
name: Research Director
#- type: accessLevel
# id: ResearchDirector
# name: Research Director
- type: accessLevel
id: Research

View File

@@ -1,12 +1,12 @@
- type: accessLevel
id: HeadOfSecurity
name: Head of Security
#- type: accessLevel
# id: HeadOfSecurity
# name: Head of Security
- type: accessLevel
id: Security
- type: accessLevel
id: Brig
#- type: accessLevel
# id: Brig
- type: accessLevel
id: Detective
#- type: accessLevel
# id: Detective

View File

@@ -1,11 +1,11 @@
- type: accessLevel
id: Bar
#- type: accessLevel
# id: Bar
- type: accessLevel
id: Kitchen
#- type: accessLevel
# id: Kitchen
- type: accessLevel
id: Hydroponics
#- type: accessLevel
# id: Hydroponics
- type: accessLevel
id: Service

View File

@@ -76,7 +76,7 @@
broken: true
- type: WiresVisualizer
- type: AccessReader
access: [["Bar"]]
access: [["Service"]]
- type: entity
parent: VendingMachine
@@ -236,7 +236,7 @@
broken: true
- type: WiresVisualizer
- type: AccessReader
access: [["Kitchen"]]
access: [["Service"]]
- type: entity
parent: VendingMachine
@@ -417,7 +417,7 @@
broken: true
- type: WiresVisualizer
- type: AccessReader
access: [["Hydroponics"]]
access: [["Service"]]
- type: entity
parent: VendingMachine
@@ -525,7 +525,7 @@
broken: true
- type: WiresVisualizer
- type: AccessReader
access: [["Hydroponics"]]
access: [["Service"]]
- type: entity
parent: VendingMachine

View File

@@ -9,4 +9,4 @@
- type: StorageVisualizer
state: cabinet
- type: AccessReader
access: [["Bar"]]
access: [["Service"]]

View File

@@ -9,7 +9,7 @@
- type: StorageVisualizer
state: ce
- type: AccessReader
access: [ [ "ChiefEngineer" ] ]
access: [ [ "Engineering", "Command" ] ]
# Electrical supplies
- type: entity

View File

@@ -8,4 +8,4 @@
- type: StorageVisualizer
state: hydro
- type: AccessReader
access: [ [ "Hydroponics" ] ]
access: [ [ "Service" ] ]

View File

@@ -50,4 +50,4 @@
- type: StorageVisualizer
state: cmo
- type: AccessReader
access: [ [ "ChiefMedicalOfficer" ] ]
access: [ [ "Medical", "Command" ] ]

View File

@@ -8,7 +8,7 @@
- type: StorageVisualizer
state: rd
- type: AccessReader
access: [ [ "ResearchDirector" ] ]
access: [ [ "Research", "Command" ] ]
- type: entity
id: LockerScientist

View File

@@ -9,7 +9,7 @@
- type: StorageVisualizer
state: hos
- type: AccessReader
access: [["HeadOfSecurity"]]
access: [["Security", "Command"]]
# Warden
- type: entity

View File

@@ -375,7 +375,7 @@
parent: CrateGeneric
components:
- type: AccessReader
access: [["Science"]]
access: [["Research"]]
- type: SecureEntityStorage
- type: Sprite
sprite: Constructible/Storage/Crates/scicrate_secure.rsi

View File

@@ -1,26 +1,26 @@
- type: job
id: Quartermaster
name: "quartermaster"
positions: 1
spawnPositions: 1
startingGear: QuartermasterGear
departments:
- Cargo
icon: "QuarterMaster"
access:
- Cargo
- Quartermaster
- Maintenance
- type: startingGear
id: QuartermasterGear
equipment:
head: ClothingHeadHatCargosoft
innerclothing: ClothingUniformJumpsuitQM
backpack: ClothingBackpackFilled
shoes: ClothingShoesColorBrown
idcard: QuartermasterPDA
ears: ClothingHeadsetCargo
innerclothingskirt: ClothingUniformJumpskirtQM
satchel: ClothingBackpackSatchelFilled
duffelbag: ClothingBackpackDuffelFilled
#- type: job
# id: Quartermaster
# name: "quartermaster"
# positions: 1
# spawnPositions: 1
# startingGear: QuartermasterGear
# departments:
# - Cargo
# icon: "QuarterMaster"
# access:
# - Cargo
# - Quartermaster
# - Maintenance
#
#- type: startingGear
# id: QuartermasterGear
# equipment:
# head: ClothingHeadHatCargosoft
# innerclothing: ClothingUniformJumpsuitQM
# backpack: ClothingBackpackFilled
# shoes: ClothingShoesColorBrown
# idcard: QuartermasterPDA
# ears: ClothingHeadsetCargo
# innerclothingskirt: ClothingUniformJumpskirtQM
# satchel: ClothingBackpackSatchelFilled
# duffelbag: ClothingBackpackDuffelFilled

View File

@@ -8,7 +8,6 @@
icon: "Bartender"
access:
- Service
- Bar
- Maintenance
- type: startingGear

View File

@@ -9,7 +9,6 @@
icon: "Botanist"
access:
- Service
- Hydroponics
- Maintenance
- type: startingGear

View File

@@ -8,7 +8,6 @@
icon: "Chef"
access:
- Service
- Kitchen
- Maintenance
- type: startingGear

View File

@@ -16,21 +16,13 @@
- HeadOfPersonnel
- Command
- Security
- HeadOfSecurity
- Brig
- Detective
- ChiefEngineer
- Engineering
- ChiefMedicalOfficer
- Medical
- Quartermaster
- Cargo
- ResearchDirector
- Research
- Bar
- Kitchen
- Service
- Hydroponics
- Maintenance
- External
- Janitor

View File

@@ -11,7 +11,6 @@
access:
- Maintenance
- Engineering
- ChiefEngineer
- Command
- External

View File

@@ -12,7 +12,6 @@
icon: "ChiefMedicalOfficer"
access:
- Medical
- ChiefMedicalOfficer
- Command
- Maintenance

View File

@@ -10,7 +10,6 @@
icon: "ResearchDirector"
access:
- Research
- ResearchDirector
- Command
- Maintenance

View File

@@ -10,9 +10,7 @@
icon: "HeadOfSecurity"
access:
- Command
- HeadOfSecurity
- Brig
- Detective
- Security
- Maintenance
- Service