@@ -16,6 +16,7 @@ using Robust.Shared.Audio;
|
||||
using Robust.Server.GameObjects;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Roles;
|
||||
using Robust.Shared.Containers;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Server.Station.Systems;
|
||||
@@ -26,6 +27,7 @@ using Robust.Server.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Shared.Players;
|
||||
|
||||
namespace Content.Server.Antag;
|
||||
|
||||
@@ -43,6 +45,8 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
|
||||
[Dependency] private readonly StorageSystem _storageSystem = default!;
|
||||
[Dependency] private readonly StationSystem _stationSystem = default!;
|
||||
[Dependency] private readonly EmergencyShuttleSystem _emergencyShuttle = default!;
|
||||
[Dependency] private readonly RoleSystem _roles = default!; // WD
|
||||
[Dependency] private readonly SharedPlayerSystem _sharedPlayerSystem = default!; // WD
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to start the game rule by checking if there are enough players in lobby and readied.
|
||||
@@ -163,6 +167,9 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
|
||||
|
||||
foreach (var player in candidates.Keys)
|
||||
{
|
||||
if (_sharedPlayerSystem.ContentData(player) is not {Mind: { } mindId} || _roles.MindIsAntagonist(mindId))
|
||||
continue;
|
||||
|
||||
// Role prevents antag.
|
||||
if (!_jobs.CanBeAntag(player))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user