revert: not check entry.
This commit is contained in:
parent
4acae6af06
commit
4b3449bd27
|
@ -33,13 +33,7 @@ function generateImportFunction(type, pathParser) {
|
|||
const modeContent = await import(pathParser(name));
|
||||
if (!modeContent.type) return;
|
||||
if (modeContent.type !== type) throw new Error(`Loaded Content doesnt conform to "${type}"`);
|
||||
// TODO: 设想的新导入名称,用`export function entry() {...}`将内容暴露出去
|
||||
if ('entry' in modeContent) await game.import(type, (lib, game, ui, get, ai, _status) => {
|
||||
// TODO: 第一个参数打算提供一些信息,用于直接判断;后面依然提供六个全局变量,用于一些其他方式制作的扩展
|
||||
return modeContent.entry({}, {lib, game, ui, get, ai, _status})
|
||||
})
|
||||
// 不好说要不要保留
|
||||
else await game.import(type, modeContent.default);
|
||||
await game.import(type, modeContent.default);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue