| 123456789101112131415161718192021222324 |
- using Content.Server.Objectives.Components;
- using Content.Server.Revolutionary.Components;
- using Content.Shared.Objectives.Components;
- namespace Content.Server.Objectives.Systems;
- public sealed class NotCommandRequirementSystem : EntitySystem
- {
- public override void Initialize()
- {
- base.Initialize();
- SubscribeLocalEvent<NotCommandRequirementComponent, RequirementCheckEvent>(OnCheck);
- }
- private void OnCheck(EntityUid uid, NotCommandRequirementComponent comp, ref RequirementCheckEvent args)
- {
- if (args.Cancelled)
- return;
- if (args.Mind.OwnedEntity is { } ent && HasComp<CommandStaffComponent>(ent))
- args.Cancelled = true;
- }
- }
|