fix bug where empty rooms without puzzles could not be skipped

This commit is contained in:
2022-11-22 00:50:35 +01:00
parent dca8a3b76e
commit 2833c4d897

View File

@@ -35,6 +35,11 @@ namespace EscapeRoomEngine.Engine.Runtime
Logger.Log($"Skipping {this}...", LogType.PuzzleFlow); Logger.Log($"Skipping {this}...", LogType.PuzzleFlow);
_puzzles.ForEach(puzzle => puzzle.PuzzleState.Solve()); _puzzles.ForEach(puzzle => puzzle.PuzzleState.Solve());
if (_puzzles.Count == 0)
{
exit.fromOut.DoorState.Unlock();
}
} }
internal void AddPuzzle(PuzzleModule puzzle) internal void AddPuzzle(PuzzleModule puzzle)