end terminal placement
This commit is contained in:
@@ -189,8 +189,14 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
private void GenerateEndSpace(Room room, Passage entrance)
|
||||
{
|
||||
Logger.Log($"Generating end space...", LogType.RoomGeneration);
|
||||
|
||||
room.AddSpace(new Space(room, entrance), null);
|
||||
|
||||
var space = new Space(room, entrance);
|
||||
var endModule = new Module(space, theme.endModule);
|
||||
if (!space.AddModuleWithRequirements(endModule))
|
||||
{
|
||||
throw new EngineException("Could not satisfy requirements for end module.");
|
||||
}
|
||||
room.AddSpace(space, null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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;
|
||||
@@ -19,6 +20,9 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
[BoxGroup("Theme")]
|
||||
public Intro intro;
|
||||
|
||||
[BoxGroup("Theme")]
|
||||
public ModuleDescription endModule;
|
||||
|
||||
[BoxGroup("Theme")] [Required]
|
||||
[Tooltip("The tile that rooms are generated from.")]
|
||||
public SpaceTile spaceTile;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
|
||||
/// </summary>
|
||||
public static bool Store { get; set; }
|
||||
public static bool PreferLessPlayed => GameControl.Instance.preferLessPlayed.Value;
|
||||
public static int PuzzlesSolved => _currentSession.PuzzlesSolved.Count;
|
||||
|
||||
private static Dictionary<int, PuzzleMeasurement> _runningMeasurements;
|
||||
private static Session _currentSession;
|
||||
|
||||
Reference in New Issue
Block a user