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.GameObjects.Components.Items.Storage;
|
||||||
using Content.Server.Interfaces;
|
using Content.Server.Interfaces;
|
||||||
using Content.Server.Interfaces.GameObjects.Components.Items;
|
using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||||
|
using Content.Shared.Access;
|
||||||
using Content.Shared.GameObjects.Components.Inventory;
|
using Content.Shared.GameObjects.Components.Inventory;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Log;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -103,6 +107,20 @@ namespace Content.Server.GameObjects.Components.Access
|
|||||||
return Array.Empty<string>();
|
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)
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
{
|
{
|
||||||
base.ExposeData(serializer);
|
base.ExposeData(serializer);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: Quartermaster
|
# id: Quartermaster
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Cargo
|
id: Cargo
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: ChiefEngineer
|
# id: ChiefEngineer
|
||||||
name: Chief Engineer
|
# name: Chief Engineer
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Engineering
|
id: Engineering
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: ChiefMedicalOfficer
|
# id: ChiefMedicalOfficer
|
||||||
name: Chief Medical Officer
|
# name: Chief Medical Officer
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Medical
|
id: Medical
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: ResearchDirector
|
# id: ResearchDirector
|
||||||
name: Research Director
|
# name: Research Director
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Research
|
id: Research
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: HeadOfSecurity
|
# id: HeadOfSecurity
|
||||||
name: Head of Security
|
# name: Head of Security
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Security
|
id: Security
|
||||||
|
|
||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: Brig
|
# id: Brig
|
||||||
|
|
||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: Detective
|
# id: Detective
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: Bar
|
# id: Bar
|
||||||
|
|
||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: Kitchen
|
# id: Kitchen
|
||||||
|
|
||||||
- type: accessLevel
|
#- type: accessLevel
|
||||||
id: Hydroponics
|
# id: Hydroponics
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Service
|
id: Service
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
broken: true
|
broken: true
|
||||||
- type: WiresVisualizer
|
- type: WiresVisualizer
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Bar"]]
|
access: [["Service"]]
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: VendingMachine
|
parent: VendingMachine
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
broken: true
|
broken: true
|
||||||
- type: WiresVisualizer
|
- type: WiresVisualizer
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Kitchen"]]
|
access: [["Service"]]
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: VendingMachine
|
parent: VendingMachine
|
||||||
@@ -417,7 +417,7 @@
|
|||||||
broken: true
|
broken: true
|
||||||
- type: WiresVisualizer
|
- type: WiresVisualizer
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Hydroponics"]]
|
access: [["Service"]]
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: VendingMachine
|
parent: VendingMachine
|
||||||
@@ -525,7 +525,7 @@
|
|||||||
broken: true
|
broken: true
|
||||||
- type: WiresVisualizer
|
- type: WiresVisualizer
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Hydroponics"]]
|
access: [["Service"]]
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: VendingMachine
|
parent: VendingMachine
|
||||||
|
|||||||
@@ -9,4 +9,4 @@
|
|||||||
- type: StorageVisualizer
|
- type: StorageVisualizer
|
||||||
state: cabinet
|
state: cabinet
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Bar"]]
|
access: [["Service"]]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
- type: StorageVisualizer
|
- type: StorageVisualizer
|
||||||
state: ce
|
state: ce
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [ [ "ChiefEngineer" ] ]
|
access: [ [ "Engineering", "Command" ] ]
|
||||||
|
|
||||||
# Electrical supplies
|
# Electrical supplies
|
||||||
- type: entity
|
- type: entity
|
||||||
|
|||||||
@@ -8,4 +8,4 @@
|
|||||||
- type: StorageVisualizer
|
- type: StorageVisualizer
|
||||||
state: hydro
|
state: hydro
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [ [ "Hydroponics" ] ]
|
access: [ [ "Service" ] ]
|
||||||
|
|||||||
@@ -50,4 +50,4 @@
|
|||||||
- type: StorageVisualizer
|
- type: StorageVisualizer
|
||||||
state: cmo
|
state: cmo
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [ [ "ChiefMedicalOfficer" ] ]
|
access: [ [ "Medical", "Command" ] ]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
- type: StorageVisualizer
|
- type: StorageVisualizer
|
||||||
state: rd
|
state: rd
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [ [ "ResearchDirector" ] ]
|
access: [ [ "Research", "Command" ] ]
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerScientist
|
id: LockerScientist
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
- type: StorageVisualizer
|
- type: StorageVisualizer
|
||||||
state: hos
|
state: hos
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["HeadOfSecurity"]]
|
access: [["Security", "Command"]]
|
||||||
|
|
||||||
# Warden
|
# Warden
|
||||||
- type: entity
|
- type: entity
|
||||||
|
|||||||
@@ -375,7 +375,7 @@
|
|||||||
parent: CrateGeneric
|
parent: CrateGeneric
|
||||||
components:
|
components:
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Science"]]
|
access: [["Research"]]
|
||||||
- type: SecureEntityStorage
|
- type: SecureEntityStorage
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Constructible/Storage/Crates/scicrate_secure.rsi
|
sprite: Constructible/Storage/Crates/scicrate_secure.rsi
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
- type: job
|
#- type: job
|
||||||
id: Quartermaster
|
# id: Quartermaster
|
||||||
name: "quartermaster"
|
# name: "quartermaster"
|
||||||
positions: 1
|
# positions: 1
|
||||||
spawnPositions: 1
|
# spawnPositions: 1
|
||||||
startingGear: QuartermasterGear
|
# startingGear: QuartermasterGear
|
||||||
departments:
|
# departments:
|
||||||
- Cargo
|
# - Cargo
|
||||||
icon: "QuarterMaster"
|
# icon: "QuarterMaster"
|
||||||
access:
|
# access:
|
||||||
- Cargo
|
# - Cargo
|
||||||
- Quartermaster
|
# - Quartermaster
|
||||||
- Maintenance
|
# - Maintenance
|
||||||
|
#
|
||||||
- type: startingGear
|
#- type: startingGear
|
||||||
id: QuartermasterGear
|
# id: QuartermasterGear
|
||||||
equipment:
|
# equipment:
|
||||||
head: ClothingHeadHatCargosoft
|
# head: ClothingHeadHatCargosoft
|
||||||
innerclothing: ClothingUniformJumpsuitQM
|
# innerclothing: ClothingUniformJumpsuitQM
|
||||||
backpack: ClothingBackpackFilled
|
# backpack: ClothingBackpackFilled
|
||||||
shoes: ClothingShoesColorBrown
|
# shoes: ClothingShoesColorBrown
|
||||||
idcard: QuartermasterPDA
|
# idcard: QuartermasterPDA
|
||||||
ears: ClothingHeadsetCargo
|
# ears: ClothingHeadsetCargo
|
||||||
innerclothingskirt: ClothingUniformJumpskirtQM
|
# innerclothingskirt: ClothingUniformJumpskirtQM
|
||||||
satchel: ClothingBackpackSatchelFilled
|
# satchel: ClothingBackpackSatchelFilled
|
||||||
duffelbag: ClothingBackpackDuffelFilled
|
# duffelbag: ClothingBackpackDuffelFilled
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
icon: "Bartender"
|
icon: "Bartender"
|
||||||
access:
|
access:
|
||||||
- Service
|
- Service
|
||||||
- Bar
|
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
- type: startingGear
|
- type: startingGear
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
icon: "Botanist"
|
icon: "Botanist"
|
||||||
access:
|
access:
|
||||||
- Service
|
- Service
|
||||||
- Hydroponics
|
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
- type: startingGear
|
- type: startingGear
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
icon: "Chef"
|
icon: "Chef"
|
||||||
access:
|
access:
|
||||||
- Service
|
- Service
|
||||||
- Kitchen
|
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
- type: startingGear
|
- type: startingGear
|
||||||
|
|||||||
@@ -16,21 +16,13 @@
|
|||||||
- HeadOfPersonnel
|
- HeadOfPersonnel
|
||||||
- Command
|
- Command
|
||||||
- Security
|
- Security
|
||||||
- HeadOfSecurity
|
|
||||||
- Brig
|
- Brig
|
||||||
- Detective
|
|
||||||
- ChiefEngineer
|
|
||||||
- Engineering
|
- Engineering
|
||||||
- ChiefMedicalOfficer
|
|
||||||
- Medical
|
- Medical
|
||||||
- Quartermaster
|
|
||||||
- Cargo
|
- Cargo
|
||||||
- ResearchDirector
|
- ResearchDirector
|
||||||
- Research
|
- Research
|
||||||
- Bar
|
|
||||||
- Kitchen
|
|
||||||
- Service
|
- Service
|
||||||
- Hydroponics
|
|
||||||
- Maintenance
|
- Maintenance
|
||||||
- External
|
- External
|
||||||
- Janitor
|
- Janitor
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
access:
|
access:
|
||||||
- Maintenance
|
- Maintenance
|
||||||
- Engineering
|
- Engineering
|
||||||
- ChiefEngineer
|
|
||||||
- Command
|
- Command
|
||||||
- External
|
- External
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
icon: "ChiefMedicalOfficer"
|
icon: "ChiefMedicalOfficer"
|
||||||
access:
|
access:
|
||||||
- Medical
|
- Medical
|
||||||
- ChiefMedicalOfficer
|
|
||||||
- Command
|
- Command
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
icon: "ResearchDirector"
|
icon: "ResearchDirector"
|
||||||
access:
|
access:
|
||||||
- Research
|
- Research
|
||||||
- ResearchDirector
|
|
||||||
- Command
|
- Command
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,7 @@
|
|||||||
icon: "HeadOfSecurity"
|
icon: "HeadOfSecurity"
|
||||||
access:
|
access:
|
||||||
- Command
|
- Command
|
||||||
- HeadOfSecurity
|
|
||||||
- Brig
|
- Brig
|
||||||
- Detective
|
|
||||||
- Security
|
- Security
|
||||||
- Maintenance
|
- Maintenance
|
||||||
- Service
|
- Service
|
||||||
|
|||||||
Reference in New Issue
Block a user