New Objective: Ensure another traitor stays alive. (#6020)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Rane
2022-01-13 09:53:50 -05:00
committed by GitHub
parent b336a394f9
commit b5f03f4682
7 changed files with 123 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
using System;
using Content.Server.Objectives.Interfaces;
using Content.Server.Traitor;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.GameObjects;
using Content.Server.GameTicking.Rules;
namespace Content.Server.Objectives.Requirements
{
[DataDefinition]
public class MultipleTraitorsRequirement : IObjectiveRequirement
{
[DataField("traitors")]
private readonly int _requiredTraitors = 2;
public bool CanBeAssigned(Mind.Mind mind)
{
return EntitySystem.Get<TraitorRuleSystem>().TotalTraitors >= _requiredTraitors;
}
}
}