aboutsummaryrefslogtreecommitdiff
path: root/src/modules/mods.js
diff options
context:
space:
mode:
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();
}