mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 23:24:52 +09:00
Tie data exports to mod packs
Store the export manifest in ModPack to allow mulitple mod packs to have different data exported. This is necessary as the export contains the settings prototypes needed to create a proper UI for mod settings. For now the useLocale and useItemMetadata interfaces uses the manifest for a default mod pack set in the master config.
This commit is contained in:
1 parent
7c6aaeb05d
commit
13e12f7335
16 files changed
+146
-34
No files matched your search
@@ -93,6 +93,18 @@ class BaseConnection extends libLink.Link {
|
||||
}
|
||||
return { mod_pack: modPack.toJSON() };
|
||||
}
|
||||
|
||||
async getDefaultModPackRequestHandler(message) {
|
||||
let id = this._master.config.get("master.default_mod_pack_id");
|
||||
if (id === null) {
|
||||
throw new libErrors.RequestError("Default mod pack not set on master");
|
||||
}
|
||||
let modPack = this._master.modPacks.get(id);
|
||||
if (!modPack) {
|
||||
throw new libErrors.RequestError(`Default mod pack configured (${id}) does not exist`);
|
||||
}
|
||||
return { mod_pack: modPack.toJSON() };
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BaseConnection;
|
||||
Reference in new issue
Block a user