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:
committed by
GitHub
parent
0f54a01d24
commit
6a79782fc0
@@ -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);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- type: accessLevel
|
||||
id: Quartermaster
|
||||
#- type: accessLevel
|
||||
# id: Quartermaster
|
||||
|
||||
- type: accessLevel
|
||||
id: Cargo
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
- type: accessLevel
|
||||
id: ChiefEngineer
|
||||
name: Chief Engineer
|
||||
#- type: accessLevel
|
||||
# id: ChiefEngineer
|
||||
# name: Chief Engineer
|
||||
|
||||
- type: accessLevel
|
||||
id: Engineering
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
- type: accessLevel
|
||||
id: ChiefMedicalOfficer
|
||||
name: Chief Medical Officer
|
||||
#- type: accessLevel
|
||||
# id: ChiefMedicalOfficer
|
||||
# name: Chief Medical Officer
|
||||
|
||||
- type: accessLevel
|
||||
id: Medical
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
- type: accessLevel
|
||||
id: ResearchDirector
|
||||
name: Research Director
|
||||
#- type: accessLevel
|
||||
# id: ResearchDirector
|
||||
# name: Research Director
|
||||
|
||||
- type: accessLevel
|
||||
id: Research
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
- type: StorageVisualizer
|
||||
state: cabinet
|
||||
- type: AccessReader
|
||||
access: [["Bar"]]
|
||||
access: [["Service"]]
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
- type: StorageVisualizer
|
||||
state: ce
|
||||
- type: AccessReader
|
||||
access: [ [ "ChiefEngineer" ] ]
|
||||
access: [ [ "Engineering", "Command" ] ]
|
||||
|
||||
# Electrical supplies
|
||||
- type: entity
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
- type: StorageVisualizer
|
||||
state: hydro
|
||||
- type: AccessReader
|
||||
access: [ [ "Hydroponics" ] ]
|
||||
access: [ [ "Service" ] ]
|
||||
|
||||
@@ -50,4 +50,4 @@
|
||||
- type: StorageVisualizer
|
||||
state: cmo
|
||||
- type: AccessReader
|
||||
access: [ [ "ChiefMedicalOfficer" ] ]
|
||||
access: [ [ "Medical", "Command" ] ]
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- type: StorageVisualizer
|
||||
state: rd
|
||||
- type: AccessReader
|
||||
access: [ [ "ResearchDirector" ] ]
|
||||
access: [ [ "Research", "Command" ] ]
|
||||
|
||||
- type: entity
|
||||
id: LockerScientist
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
- type: StorageVisualizer
|
||||
state: hos
|
||||
- type: AccessReader
|
||||
access: [["HeadOfSecurity"]]
|
||||
access: [["Security", "Command"]]
|
||||
|
||||
# Warden
|
||||
- type: entity
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
parent: CrateGeneric
|
||||
components:
|
||||
- type: AccessReader
|
||||
access: [["Science"]]
|
||||
access: [["Research"]]
|
||||
- type: SecureEntityStorage
|
||||
- type: Sprite
|
||||
sprite: Constructible/Storage/Crates/scicrate_secure.rsi
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
icon: "Bartender"
|
||||
access:
|
||||
- Service
|
||||
- Bar
|
||||
- Maintenance
|
||||
|
||||
- type: startingGear
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
icon: "Botanist"
|
||||
access:
|
||||
- Service
|
||||
- Hydroponics
|
||||
- Maintenance
|
||||
|
||||
- type: startingGear
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
icon: "Chef"
|
||||
access:
|
||||
- Service
|
||||
- Kitchen
|
||||
- Maintenance
|
||||
|
||||
- type: startingGear
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
access:
|
||||
- Maintenance
|
||||
- Engineering
|
||||
- ChiefEngineer
|
||||
- Command
|
||||
- External
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
icon: "ChiefMedicalOfficer"
|
||||
access:
|
||||
- Medical
|
||||
- ChiefMedicalOfficer
|
||||
- Command
|
||||
- Maintenance
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
icon: "ResearchDirector"
|
||||
access:
|
||||
- Research
|
||||
- ResearchDirector
|
||||
- Command
|
||||
- Maintenance
|
||||
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
icon: "HeadOfSecurity"
|
||||
access:
|
||||
- Command
|
||||
- HeadOfSecurity
|
||||
- Brig
|
||||
- Detective
|
||||
- Security
|
||||
- Maintenance
|
||||
- Service
|
||||
|
||||
Reference in New Issue
Block a user