Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
19 lines
567 B
C#
19 lines
567 B
C#
using Content.Server.Mind;
|
|
using Content.Server.Objectives.Interfaces;
|
|
using Content.Server.Roles;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Content.Server.Objectives.Requirements
|
|
{
|
|
[UsedImplicitly]
|
|
[DataDefinition]
|
|
public sealed partial class TraitorRequirement : IObjectiveRequirement
|
|
{
|
|
public bool CanBeAssigned(EntityUid mindId, MindComponent mind)
|
|
{
|
|
var roleSystem = IoCManager.Resolve<IEntityManager>().System<RoleSystem>();
|
|
return roleSystem.MindHasRole<TraitorRoleComponent>(mindId);
|
|
}
|
|
}
|
|
}
|