using System.Collections.Generic; using EscapeRoomEngine.Engine.Runtime.Environment; using EscapeRoomEngine.Engine.Runtime.Modules.Description; using EscapeRoomEngine.Engine.Runtime.Modules.State; using EscapeRoomEngine.Engine.Runtime.Utilities; using JetBrains.Annotations; using NaughtyAttributes; using UnityEngine; namespace EscapeRoomEngine.Engine.Runtime { /// /// An engine theme decides the room size, look and available modules for the engine. /// [CreateAssetMenu(menuName = "Engine Theme")] public class EngineTheme : ScriptableObject { #region Theme [BoxGroup("Theme")] public Intro intro; [BoxGroup("Theme")] public ModuleDescription endModule; [BoxGroup("Theme")] [Required] [Tooltip("The tile that rooms are generated from.")] public SpaceTile spaceTile; [BoxGroup("Theme")] [Tooltip("The environments that are placed around generated rooms.")] public List environments; [BoxGroup("Theme")] public DynamicColor puzzleColor, solvedColor, activeColor; #endregion #region Doors [BoxGroup("Doors")] [Required] public DoorModuleDescription spawnDoor; [BoxGroup("Doors")] [Required] public DoorModuleDescription introExitDoor; [BoxGroup("Doors")] [ValidateInput("IsNotEmpty", "At least one exit door type is required.")] [Tooltip("The types of exit doors this theme provides. Entrance doors are connected to the exit doors and don't need to be specified here.")] public List exitDoorTypes; #endregion #region Puzzles [BoxGroup("Puzzles")] [MinMaxSlider(0, 24)] public Vector2Int puzzleCount; [BoxGroup("Puzzles")] public List puzzleTypes; public PuzzleModuleDescription GetPuzzle(int id) => puzzleTypes.Find(puzzle => puzzle.Id == id); #endregion [UsedImplicitly] private bool IsNotEmpty(List modules) => modules.Count > 0; } }