diff options
author | 0neGal <mail@0negal.com> | 2023-07-24 20:38:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 20:38:21 +0200 |
commit | b18038892db6567acb56822d1d7a1fe35f1c225f (patch) | |
tree | afeac6f0d804be5d4f812afcbadc63ff8d2854fa /src/index.js | |
parent | 112610902caef019ea4af17d77079cd090d6b9b5 (diff) | |
parent | 55040f6808f4aef3cd7ba86a45290d03963c37bd (diff) | |
download | Viper-b18038892db6567acb56822d1d7a1fe35f1c225f.tar.gz Viper-b18038892db6567acb56822d1d7a1fe35f1c225f.zip |
Merge pull request #191 from 0neGal/packages-dir
feat: Support for the new packages folder
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js index 259f7cc..3e7e08f 100644 --- a/src/index.js +++ b/src/index.js @@ -19,6 +19,7 @@ const version = require("./modules/version"); const gamepath = require("./modules/gamepath"); const settings = require("./modules/settings"); const requests = require("./modules/requests"); +const packages = require("./modules/packages"); const is_running = require("./modules/is_running"); console = require("./modules/console"); @@ -112,7 +113,9 @@ function start() { // install calls ipcMain.on("install-from-path", (event, path) => {mods.install(path)}); - ipcMain.on("install-from-url", (event, url, author) => {mods.installFromURL(url, author)}); + ipcMain.on("install-from-url", (event, url, author, package_name, version) => { + packages.install(url, author, package_name, version); + }); win.webContents.on("dom-ready", () => { send("mods", mods.list()); @@ -238,13 +241,13 @@ ipcMain.on("getmods", () => { log(`${lang("general.mods.installed")} ${mods.all.length}`); log(`${lang("general.mods.enabled")} ${mods.enabled.length}`); for (let i = 0; i < mods.enabled.length; i++) { - log(` ${mods.enabled[i].Name} ${mods.enabled[i].Version}`); + log(` ${mods.enabled[i].name} ${mods.enabled[i].version}`); } if (mods.disabled.length > 0) { log(`${lang("general.mods.disabled")} ${mods.disabled.length}`); for (let i = 0; i < mods.disabled.length; i++) { - log(` ${mods.disabled[i].Name} ${mods.disabled[i].Version}`); + log(` ${mods.disabled[i].name} ${mods.disabled[i].version}`); } } cli.exit(0); |