using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
using VOID.Generic.Dict;

namespace VOID.ScriptableObjects.Affiliation
{
    [CreateAssetMenu(menuName = "GAME DATA/Frakcje/Frakcja")]
    public class Faction : SerializedScriptableObject
    {
        [Required]
        public string factionName;

        public bool isPlayerFaction;

        public Dictionary<Faction, AttitudeType> factionAttitudes = new();

        public AttitudeType? GetAttitudeFor(Faction otherFaction)
        {
            var hasAttitude = factionAttitudes.TryGetValue(otherFaction, out var attitude);
            return hasAttitude ? attitude : null;
        }
    }
}