fish-station/Content.Server/Objectives/Requirements/MultipleTraitorsRequirement.cs
Rane b5f03f4682
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>
2022-01-14 01:53:50 +11:00

21 lines
622 B
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}
}