using Content.Server.Objectives.Components;
+using Content.Server.Revolutionary.Components;
using Content.Server.Shuttles.Systems;
using Content.Shared.CCVar;
using Content.Shared.Mind;
using Content.Shared.Objectives.Components;
-using Content.Shared.Roles.Jobs;
using Robust.Shared.Configuration;
using Robust.Shared.Random;
[Dependency] private readonly EmergencyShuttleSystem _emergencyShuttle = default!;
[Dependency] private readonly IConfigurationManager _config = default!;
[Dependency] private readonly IRobustRandom _random = default!;
- [Dependency] private readonly SharedJobSystem _job = default!;
[Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly TargetObjectiveSystem _target = default!;
}
var allHeads = new List<EntityUid>();
- foreach (var mind in allHumans)
+ foreach (var person in allHumans)
{
- // RequireAdminNotify used as a cheap way to check for command department
- if (_job.MindTryGetJob(mind, out var prototype) && prototype.RequireAdminNotify)
- allHeads.Add(mind);
+ if (TryComp<MindComponent>(person, out var mind) && mind.OwnedEntity is { } ent && HasComp<CommandStaffComponent>(ent))
+ allHeads.Add(person);
}
if (allHeads.Count == 0)
using Content.Server.Objectives.Components;
+using Content.Server.Revolutionary.Components;
using Content.Shared.Objectives.Components;
-using Content.Shared.Roles.Jobs;
namespace Content.Server.Objectives.Systems;
public sealed class NotCommandRequirementSystem : EntitySystem
{
- [Dependency] private readonly SharedJobSystem _job = default!;
-
public override void Initialize()
{
base.Initialize();
if (args.Cancelled)
return;
- // cheap equivalent to checking that job department is command, since all command members require admin notification when leaving
- if (_job.MindTryGetJob(args.MindId, out var prototype) && prototype.RequireAdminNotify)
+ if (args.Mind.OwnedEntity is { } ent && HasComp<CommandStaffComponent>(ent))
args.Cancelled = true;
}
}
-using Content.Server.GameTicking.Rules;
-
namespace Content.Server.Revolutionary.Components;
/// <summary>
-/// Given to heads at round start for Revs. Used for tracking if heads died or not.
+/// Given to heads at round start. Used for assigning traitors to kill heads and for revs to check if the heads died or not.
/// </summary>
-[RegisterComponent, Access(typeof(RevolutionaryRuleSystem))]
+[RegisterComponent]
public sealed partial class CommandStaffComponent : Component
{