custom exceptions, methods to create modules and states of specific type from generic ones
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using EscapeRoomEngine.Engine.Runtime.Modules;
|
||||
@@ -77,7 +76,7 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
// add exit
|
||||
var exitDoor = new DoorModule(space, theme.exitDoorTypes.RandomElement());
|
||||
if (!space.AddModuleWithRequirements(exitDoor))
|
||||
throw new Exception("Could not satisfy requirements for exit door.");
|
||||
throw new EngineException("Could not satisfy requirements for exit door.");
|
||||
var exit = new Passage(exitDoor);
|
||||
|
||||
// add puzzles
|
||||
|
||||
Reference in New Issue
Block a user