Add alignment methods for IFaction

pull/36/merge
John Montagu, the 4th Earl of Sandvich 2024-05-18 15:53:33 -07:00
parent 40ba0285f4
commit 7b98fe4b96
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 10 additions and 0 deletions

View File

@ -9,4 +9,14 @@ public interface IFaction
/// </summary>
[Export]
public ushort Faction { get; set; }
public bool AlignsWith(IFaction other)
{
return (Faction & other.Faction) > 0;
}
public bool AlignsFullyWith(IFaction other)
{
return Faction == other.Faction;
}
}