From bb25cfe318da51cec0ea8cafff09461ba3117443 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Thu, 12 Jan 2023 18:51:02 +0100 Subject: basically support thunderstore_author.txt This doesn't entirely uphold support, as it doesn't use the author file for anything, however it does write it as intended. --- src/app/main.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/app/main.js') diff --git a/src/app/main.js b/src/app/main.js index 9d59cbc..50160d0 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -235,7 +235,7 @@ function installFromPath(path) { } // Tells the main process to install a mod from a URL -function installFromURL(url, dependencies, clearqueue) { +function installFromURL(url, dependencies, clearqueue, author) { if (clearqueue) {installqueue = []}; let prettydepends = []; @@ -248,7 +248,11 @@ function installFromURL(url, dependencies, clearqueue) { depend = dependencies[i].replaceAll("-", "/"); let pkg = depend.split("/"); if (! isModInstalled(pkg[1])) { - newdepends.push(depend); + newdepends.push({ + pkg: depend, + author: pkg[0] + }); + prettydepends.push(`${pkg[1]} v${pkg[2]} - ${lang("gui.browser.madeby")} ${pkg[0]}`); } } @@ -265,7 +269,7 @@ function installFromURL(url, dependencies, clearqueue) { } setButtons(false); - ipcRenderer.send("install-from-url", url, dependencies); + ipcRenderer.send("install-from-url", url, author); if (dependencies) { installqueue = dependencies; -- cgit v1.2.3