mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-12 03:41:14 +03:00
18 lines
554 B
C#
18 lines
554 B
C#
using Content.Server.Roles;
|
|
using Content.Shared.Mind;
|
|
using Content.Shared.Objectives.Interfaces;
|
|
|
|
namespace Content.Server.Objectives.Requirements;
|
|
|
|
/// <summary>
|
|
/// Requires the player's mind to have the ninja role component, aka be a ninja.
|
|
/// </summary>
|
|
[DataDefinition]
|
|
public sealed partial class NinjaRequirement : IObjectiveRequirement
|
|
{
|
|
public bool CanBeAssigned(EntityUid mindId, MindComponent mind)
|
|
{
|
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
|
return entMan.HasComponent<NinjaRoleComponent>(mindId);
|
|
}
|
|
}
|