Fix antag shitcurity (#5441)
* fix jobs * Antagn't the heads and sec * good to go, time to test my code
This commit is contained in:
@@ -8,6 +8,7 @@ using Content.Server.Items;
|
||||
using Content.Server.Objectives.Interfaces;
|
||||
using Content.Server.PDA;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.Traitor;
|
||||
using Content.Server.Traitor.Uplink;
|
||||
using Content.Server.Traitor.Uplink.Account;
|
||||
@@ -72,7 +73,10 @@ namespace Content.Server.GameTicking.Presets
|
||||
return false;
|
||||
}
|
||||
|
||||
var list = new List<IPlayerSession>(readyPlayers);
|
||||
var list = new List<IPlayerSession>(readyPlayers).Where(x =>
|
||||
x.Data.ContentData()?.Mind?.AllRoles.All(role => role is not Job {CanBeAntag: false}) ?? false
|
||||
).ToList();
|
||||
|
||||
var prefList = new List<IPlayerSession>();
|
||||
|
||||
foreach (var player in list)
|
||||
|
||||
@@ -14,10 +14,13 @@ namespace Content.Server.Roles
|
||||
|
||||
public string? StartingGear => Prototype.StartingGear;
|
||||
|
||||
public bool CanBeAntag;
|
||||
|
||||
public Job(Mind.Mind mind, JobPrototype jobPrototype) : base(mind)
|
||||
{
|
||||
Prototype = jobPrototype;
|
||||
Name = jobPrototype.Name;
|
||||
CanBeAntag = jobPrototype.CanBeAntag;
|
||||
}
|
||||
|
||||
public override void Greet()
|
||||
|
||||
Reference in New Issue
Block a user