From 7b98fe4b96d4e67bd4bd27a8977391c0e22601d7 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Sat, 18 May 2024 15:53:33 -0700 Subject: [PATCH] Add alignment methods for IFaction --- Utils/IFaction.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Utils/IFaction.cs b/Utils/IFaction.cs index 13562bf..29e1c8d 100644 --- a/Utils/IFaction.cs +++ b/Utils/IFaction.cs @@ -9,4 +9,14 @@ public interface IFaction /// [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; + } }