mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
More details in mod list
This commit is contained in:
1 parent
8d63bb896a
commit
a3195ad8ce
1 file changed
+18
-10
+18
-10
@@ -15,17 +15,25 @@ module.exports.listMods = function(instance){
|
|||||||
token: '53faebce0a608b1195f01dcfd95ee1',
|
token: '53faebce0a608b1195f01dcfd95ee1',
|
||||||
require_ownership: false
|
require_ownership: false
|
||||||
}).then(token => {
|
}).then(token => {
|
||||||
console.log("authed")
|
console.log("Currently installed:");
|
||||||
/**/
|
factorioAPI.readModZips().then(list => {
|
||||||
factorioAPI.getInstalledMods().then(mods => {
|
console.log(asTable(list.map(mod => {
|
||||||
console.log("Currently installed:");
|
return {
|
||||||
console.log(asTable(mods));
|
name:(mod.title || mod.name),
|
||||||
factorioAPI.getModsFromSaves().then(list => {
|
version:mod.version,
|
||||||
console.log("Mods used in save:");
|
date:mod.date,
|
||||||
console.log(JSON.stringify(list))
|
factorio_ver:mod.factorio_version,
|
||||||
console.log(asTable(list[0].mods))
|
author:mod.author,
|
||||||
});
|
}
|
||||||
|
})));
|
||||||
});
|
});
|
||||||
|
// Deactivated due to bug in node-factorio-api, see https://github.com/Danacus/node-factorio-api/issues/2
|
||||||
|
|
||||||
|
/*factorioAPI.getModsFromSaves().then(list => {
|
||||||
|
console.log("Mods used in save:");
|
||||||
|
console.log(JSON.stringify(list))
|
||||||
|
console.log(asTable(list[0].mods))
|
||||||
|
});*/
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// list shared mods in /sharedMods/
|
// list shared mods in /sharedMods/
|
||||||
|
|||||||
Reference in new issue
Block a user