diff options
author | 0neGal <mail@0negal.com> | 2022-06-07 17:23:33 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2022-06-07 17:24:41 +0200 |
commit | 59aa33289cebd63432904ac69fa7d9f4f2bc1b9c (patch) | |
tree | d937953babe0a2b40fcbc5dd1f55df2964db4bc8 /src/utils.js | |
parent | 0944356fb64512396c46b374197fdfb2606aeb07 (diff) | |
download | Viper-59aa33289cebd63432904ac69fa7d9f4f2bc1b9c.tar.gz Viper-59aa33289cebd63432904ac69fa7d9f4f2bc1b9c.zip |
minor changes
Mostly syntax, but also a few fixes with how the settings system work,
and also a change in localization strings.
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/utils.js b/src/utils.js index 2fea3ea..6114ef1 100644 --- a/src/utils.js +++ b/src/utils.js @@ -29,6 +29,7 @@ var settings = { autolang: true, forcedlang: "en", autoupdate: true, + originkill: false, nsargs: "-multiple", zip: "/northstar.zip", @@ -37,9 +38,7 @@ var settings = { excludes: [ "ns_startup_args.txt", "ns_startup_args_dedi.txt" - ], - - originkill: false + ] } // Logs into the dev tools of the renderer @@ -103,7 +102,7 @@ async function isGameRunning() { }); } -//Check if origin client is running +// checks if any origin processes are running async function isOriginRunning() { return new Promise(resolve => { let procs = ["Origin.exe", "OriginClientService.exe"]; @@ -126,7 +125,7 @@ async function isOriginRunning() { }); } -//Kill origin client +// kill origin processes async function killOrigin() { return new Promise(resolve => { let proc = "Origin.exe"; //I'm pretty sure we only have to kill this one @@ -138,7 +137,7 @@ async function killOrigin() { })(); exec(cmd, (err, stdout) => { - //just try and fail silently if we don't find it w/e + // just try and fail silently if we don't find it w/e resolve(true); }); }); @@ -879,21 +878,27 @@ setInterval(() => { module.exports = { mods, - lang, winLog, - launch, + update, - setpath, updatevp, - settings, - saveSettings, getNSVersion, getTF2Version, + handleNorthstarUpdating, + + launch, + killOrigin, isGameRunning, isOriginRunning, - killOrigin, + + + settings, + saveSettings, + + setpath, gamepathExists, - handleNorthstarUpdating, + + lang, setlang: (lang) => { settings.lang = lang; saveSettings(); |