2022-05-13 00:59:03 -07:00
|
|
|
using Content.Server.Objectives.Interfaces;
|
2022-01-13 09:53:50 -05:00
|
|
|
using Content.Server.GameTicking.Rules;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Objectives.Requirements
|
|
|
|
|
{
|
|
|
|
|
[DataDefinition]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class MultipleTraitorsRequirement : IObjectiveRequirement
|
2022-01-13 09:53:50 -05:00
|
|
|
{
|
|
|
|
|
[DataField("traitors")]
|
2023-08-22 18:14:33 -07:00
|
|
|
private int _requiredTraitors = 2;
|
2022-01-13 09:53:50 -05:00
|
|
|
|
|
|
|
|
public bool CanBeAssigned(Mind.Mind mind)
|
|
|
|
|
{
|
2023-04-25 20:23:14 -04:00
|
|
|
return EntitySystem.Get<TraitorRuleSystem>().GetOtherTraitorsAliveAndConnected(mind).Count >= _requiredTraitors;
|
2022-01-13 09:53:50 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|