mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-11-01 03:46:38 -07:00
17 lines
512 B
JavaScript
17 lines
512 B
JavaScript
|
function _shouldInclude(mdle){
|
||
|
return mdle.required == null || mdle.required.value == null || mdle.required.value === true || (mdle.required.value === false && mdle.required.def === true)
|
||
|
}
|
||
|
|
||
|
function resolveForgeFromDistro(moduleArr){
|
||
|
const mods = []
|
||
|
|
||
|
for(let i=0; i<moduleArr.length; ++i){
|
||
|
if(moduleArr[i].type != null && moduleArr[i].type === 'forgemod'){
|
||
|
if(_shouldInclude(moduleArr[i])){
|
||
|
mods.push(moduleArr[i])
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return mods
|
||
|
}
|