create generic module type that is also instantiated

This commit is contained in:
2022-11-21 11:39:43 +01:00
parent d3abb8569c
commit 95e447e8ef
2 changed files with 6 additions and 0 deletions

View File

@@ -127,6 +127,11 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
return new DoorModule(space, doorModuleDescription);
}
if (description.HasType(ModuleType.Generic))
{
return new Module(space, description);
}
throw new WrongTypeException("There is no module type fitting this description.");
}

View File

@@ -4,5 +4,6 @@
{
DoorEntrance, DoorExit, // door types
Puzzle,
Generic, // for supporting modules that have no role themselves
}
}