Added initial support for optional mods.
Optional mods are stored by ID in the configuration. Their enabled state is stored here. The mod configurations are updated each time the distro index is refreshed. Configurations are stored by server id. If the id no longer exists (changed/removed), the mod configuration is removed. If new optional mods are added, they are added to the configuration. If they are removed, they are removed from the configuration. Currently only top level optional mods are supported.
This commit is contained in:
@@ -247,6 +247,20 @@ class AssetGuard extends EventEmitter {
|
||||
return cs.join('/')
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves an artiface id without the version. For example,
|
||||
* 'net.minecraftforge:forge:1.11.2-13.20.0.2282' becomes
|
||||
* 'net.minecraftforge:forge'.
|
||||
*
|
||||
* @param {string} artifactid The artifact id string.
|
||||
* @returns {string} The resolved identifier without the version.
|
||||
*/
|
||||
static _resolveWithoutVersion(artifactid){
|
||||
let ps = artifactid.split(':')
|
||||
|
||||
return ps[0] + ':' + ps[1]
|
||||
}
|
||||
|
||||
// #endregion
|
||||
|
||||
// Static Hash Validation Functions
|
||||
|
||||
Reference in New Issue
Block a user