diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/mods.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modules/mods.js b/src/modules/mods.js index 1cb919a..9aa2c81 100644 --- a/src/modules/mods.js +++ b/src/modules/mods.js @@ -57,6 +57,7 @@ mods.list = () => { if (! mod) {return} let obj = { + Author: false, Version: "unknown", Name: "unknown", FolderName: file, @@ -64,9 +65,9 @@ mods.list = () => { obj.Disabled = ! mods.modfile.get(obj.Name); - let manifestfile = path.join(mods.path, file, "manifest.json"); - if (fs.existsSync(manifestfile)) { - let manifest = json(manifestfile); + let manifest_file = path.join(mods.path, file, "manifest.json"); + if (fs.existsSync(manifest_file)) { + let manifest = json(manifest_file); if (manifest != false) { obj.ManifestName = manifest.name; if (obj.Version == "unknown") { @@ -75,6 +76,11 @@ mods.list = () => { } } + let author_file = path.join(mods.path, file, "thunderstore_author.txt"); + if (fs.existsSync(author_file)) { + obj.Author = fs.readFileSync(author_file, "utf8"); + } + if (obj.Disabled) { disabled.push(obj); } else { |