aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-01-26 00:23:30 +0100
committerGitHub <noreply@github.com>2022-01-26 00:23:30 +0100
commit66204f6f58dc90e1e9ee40c7ea691927d0c50b8d (patch)
treeafb0172e5d4a6c4b9e4644513e012fde9efe65f5 /src/app
parent353db2c99fd26c3c925247b61b30619020a12b5a (diff)
parent6a08872d134f3afa3f81b92fabe51bdbd91f375d (diff)
downloadViper-66204f6f58dc90e1e9ee40c7ea691927d0c50b8d.tar.gz
Viper-66204f6f58dc90e1e9ee40c7ea691927d0c50b8d.zip
Merge pull request #53 from 0neGal/detect-gamepath
Detect gamepath automatically
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 5f0cc9a..19f6c9e 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -26,13 +26,11 @@ if (fs.existsSync("viper.json")) {
settings.zip = path.join(settings.gamepath + "/northstar.zip");
if (settings.gamepath.length === 0) {
- alert(lang("general.missingpath"));
setpath(false);
} else {
setpath(true);
}
} else {
- alert(lang("general.missingpath"));
setpath();
}
@@ -156,6 +154,7 @@ function installmod() {
// Frontend part of settings a new game path
ipcRenderer.on("newpath", (event, newpath) => {
settings.gamepath = newpath;
+ ipcRenderer.send("guigetmods");
})
// Continuation of log()
@@ -164,6 +163,8 @@ ipcRenderer.on("alert", (event, msg) => {alert(msg)})
// Updates the installed mods
ipcRenderer.on("mods", (event, mods) => {
+ if (! mods) {return}
+
modcount.innerHTML = `${lang("gui.mods.count")} ${mods.all.length}`;
modsdiv.innerHTML = "";