diff --git a/context.go b/context.go index 2517784..a0fc7fb 100644 --- a/context.go +++ b/context.go @@ -94,12 +94,17 @@ func connectAndMigrate(opts *connectMigrateOpts) (*sql.DB, error) { // parses the "world.mt" file in the world-dir and creates a new context func New(world_dir string) (*Context, error) { - wc, err := worldconfig.Parse(path.Join(world_dir, "world.mt")) if err != nil { return nil, err } + return NewWithConfig(world_dir, wc) +} + +// creates the database context with the given config in map form +func NewWithConfig(world_dir string, wc map[string]string) (*Context, error) { + logrus.WithFields(logrus.Fields{ "world_dir": world_dir, "world.mt": wc,