aboutsummaryrefslogtreecommitdiff
path: root/src/modules/mods.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-07-24 17:48:07 +0200
committerGitHub <noreply@github.com>2023-07-24 17:48:07 +0200
commit306e09311b681afecdf2f1063a10ad87e63f5b7a (patch)
treed8905b4c651cf762c46f595879751d4334cdb893 /src/modules/mods.js
parentd69162ff55b83c8bfe8f855b74785038c4662051 (diff)
parent11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02 (diff)
downloadViper-306e09311b681afecdf2f1063a10ad87e63f5b7a.tar.gz
Viper-306e09311b681afecdf2f1063a10ad87e63f5b7a.zip
Merge branch 'main' into add-missing-localizations
Diffstat (limited to 'src/modules/mods.js')
-rw-r--r--src/modules/mods.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/modules/mods.js b/src/modules/mods.js
index 095e501..fc2a682 100644
--- a/src/modules/mods.js
+++ b/src/modules/mods.js
@@ -10,6 +10,8 @@ const win = require("./window");
const version = require("./version");
const settings = require("./settings");
+console = require("./console");
+
const cli = require("../cli");
const lang = require("../lang");
@@ -33,7 +35,7 @@ mods.list = () => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -124,7 +126,7 @@ mods.get = (mod) => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -258,20 +260,20 @@ mods.install = (mod, opts) => {
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
let notamod = () => {
win.log(lang("gui.mods.notamod"));
- console.log("error: " + lang("cli.mods.notamod"));
+ console.error("error: " + lang("cli.mods.notamod"));
cli.exit(1);
return false;
}
let installed = () => {
- console.log(lang("cli.mods.installed"));
+ console.ok(lang("cli.mods.installed"));
cli.exit();
win.log(lang("gui.mods.installedmod"));
@@ -505,7 +507,7 @@ mods.remove = (mod) => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -521,7 +523,7 @@ mods.remove = (mod) => {
let mod_name = mods.get(mod).FolderName;
if (! mod_name) {
- console.log("error: " + lang("cli.mods.cantfind"));
+ console.error("error: " + lang("cli.mods.cantfind"));
cli.exit(1);
return;
}
@@ -544,7 +546,7 @@ mods.remove = (mod) => {
// actually remove the mod itself
fs.rmSync(path_to_mod, {recursive: true});
- console.log(lang("cli.mods.removed"));
+ console.ok(lang("cli.mods.removed"));
cli.exit();
ipcMain.emit("gui-getmods"); // send updated list to renderer
@@ -569,7 +571,7 @@ mods.toggle = (mod, fork) => {
// make sure Northstar is actually installed
if (version.northstar() == "unknown") {
win.log(lang("general.notinstalled"));
- console.log("error: " + lang("general.notinstalled"));
+ console.error("error: " + lang("general.notinstalled"));
cli.exit(1);
return false;
}
@@ -581,7 +583,7 @@ mods.toggle = (mod, fork) => {
mods.toggle(modlist[i].Name, true); // enable mod
}
- console.log(lang("cli.mods.toggledall"));
+ console.ok(lang("cli.mods.toggledall"));
cli.exit(0);
return
}
@@ -590,7 +592,7 @@ mods.toggle = (mod, fork) => {
mods.modfile.toggle(mod);
if (! fork) {
- console.log(lang("cli.mods.toggled"));
+ console.ok(lang("cli.mods.toggled"));
cli.exit();
}