using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules;
using UnityEngine;

namespace EscapeRoomEngine.Engine.Runtime.Requirements.Placement
{
    /// <summary>
    /// This requirement places a module exactly in the same position as its first related module.
    /// </summary>
    [CreateAssetMenu(menuName = "Requirements/Place With Related Module")]
    public class PlaceWithRelatedModule : PlacementRequirement
    {
        protected override List<Utilities.Placement> FilterCandidates(List<Utilities.Placement> candidates, Module module, Space space)
        {
            return new List<Utilities.Placement> { module.relatedModules[0].srPlacement };
        }
    }
}