27 lines
998 B
C#
27 lines
998 B
C#
using System.Collections.Generic;
|
|
using EscapeRoomEngine.Engine.Runtime.Requirements;
|
|
using NaughtyAttributes;
|
|
using UnityEngine;
|
|
|
|
namespace EscapeRoomEngine.Engine.Runtime.Modules
|
|
{
|
|
/// <summary>
|
|
/// The description of a specific module variant. Includes any requirements, the types and the module state that should be initialised with the module.
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "Modules/Generic Module")]
|
|
public class ModuleDescription : ScriptableObject
|
|
{
|
|
[Tooltip("The module types decide how this module can be used.")]
|
|
public List<ModuleType> types = new();
|
|
public ModuleState modulePrefab;
|
|
[BoxGroup("Requirements")]
|
|
public List<PreconditionRequirement> preconditionRequirements = new();
|
|
[BoxGroup("Requirements")]
|
|
public List<PlacementRequirement> placementRequirements = new();
|
|
|
|
internal bool HasType(ModuleType type)
|
|
{
|
|
return types.Contains(type);
|
|
}
|
|
}
|
|
} |