mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
+ asset.getModuleAsset()
* Menus can specify built in menu modules: @systemModule:XXXXX
This commit is contained in:
parent
b8d4741c18
commit
dbb3e04166
4 changed files with 28 additions and 8 deletions
|
@ -81,13 +81,13 @@ function loadMenu(options, cb) {
|
|||
});
|
||||
},
|
||||
function loadMenuModule(menuConfig, callback) {
|
||||
|
||||
var modSupplied = _.isString(menuConfig.module);
|
||||
var modAsset = asset.getModuleAsset(menuConfig.module);
|
||||
var modSupplied = null !== modAsset;
|
||||
|
||||
var modLoadOpts = {
|
||||
name : modSupplied ? menuConfig.module : 'standard_menu',
|
||||
path : modSupplied ? Config.paths.mods : __dirname,
|
||||
category : modSupplied ? 'mods' : null,
|
||||
name : modSupplied ? modAsset.asset : 'standard_menu',
|
||||
path : (!modSupplied || 'systemModule' === modAsset.type) ? __dirname : Config.paths.mods,
|
||||
category : (!modSupplied || 'systemModule' === modAsset.type) ? null : 'mods',
|
||||
};
|
||||
|
||||
moduleUtil.loadModuleEx(modLoadOpts, function moduleLoaded(err, mod) {
|
||||
|
@ -99,7 +99,7 @@ function loadMenu(options, cb) {
|
|||
|
||||
callback(err, modData);
|
||||
});
|
||||
},
|
||||
},
|
||||
function createModuleInstance(modData, callback) {
|
||||
Log.debug(
|
||||
{ moduleName : modData.name, args : options.args, config : modData.config, info : modData.mod.modInfo },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue