2022-11-19 21:21:12 -08:00
|
|
|
using Godot;
|
|
|
|
|
2023-06-03 18:21:46 -07:00
|
|
|
namespace SupaLidlGame.Utils;
|
|
|
|
|
|
|
|
public interface IFaction
|
2022-11-19 21:21:12 -08:00
|
|
|
{
|
2023-06-03 18:21:46 -07:00
|
|
|
/// <summary>
|
|
|
|
/// The faction index that this entity belongs to.
|
|
|
|
/// </summary>
|
|
|
|
[Export]
|
|
|
|
public ushort Faction { get; set; }
|
2024-05-18 15:53:33 -07:00
|
|
|
|
|
|
|
public bool AlignsWith(IFaction other)
|
|
|
|
{
|
|
|
|
return (Faction & other.Faction) > 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool AlignsFullyWith(IFaction other)
|
|
|
|
{
|
|
|
|
return Faction == other.Faction;
|
|
|
|
}
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|