mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-23 04:02:14 -08: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
|
||
|
}
|