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);