using System;
using Sirenix.OdinInspector;
using UnityEngine;
using VOID.Generic.Objects.Unit;
using VOID.ScriptableObjects.Affiliation;

namespace VOID.Generic.Requirement
{
    [TypeRegistryItem("Faction")]
    [Serializable]
    public class RequirementFaction : IUnitRequirement
    {
        [SerializeField]
        [Required]
        private Faction _faction;

        public bool Check(UnitObject unit)
        {
            return unit.unitAttitude.faction == _faction;
        }
    }
}