using Content.Server.Popups;
using Content.Server.Preferences.Managers;
using Content.Server.Roles;
+using Content.Server.Roles.Jobs;
using Content.Server.RoundEnd;
using Content.Server.Station.Components;
using Content.Server.Station.Systems;
[Dependency] private readonly SharedRoleSystem _roles = default!;
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
+ [Dependency] private readonly JobSystem _jobs = default!;
public override void Initialize()
{
var prefList = new List<ICommonSession>();
foreach (var player in allPlayers)
{
- if (player.AttachedEntity == null || !HasComp<HumanoidAppearanceComponent>(player.AttachedEntity) || HasComp<ZombieImmuneComponent>(player.AttachedEntity))
+ if (player.AttachedEntity == null || !HasComp<HumanoidAppearanceComponent>(player.AttachedEntity) ||
+ HasComp<ZombieImmuneComponent>(player.AttachedEntity) || !_jobs.CanBeAntag(player))
continue;
if (HasComp<InitialInfectedExemptComponent>(player.AttachedEntity))