aboutsummaryrefslogtreecommitdiff
path: root/src/modules/findgame.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-07-22 16:09:41 +0200
committer0neGal <mail@0negal.com>2023-07-22 16:09:41 +0200
commit11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02 (patch)
tree29fbc46781019ccc19c53664a27042acd4112f25 /src/modules/findgame.js
parente984cf81b7fd84c44fb39206c639c35a44c6054c (diff)
downloadViper-11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02.tar.gz
Viper-11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02.zip
colored console logging
Far prettier, and far more useful at a glance.
Diffstat (limited to 'src/modules/findgame.js')
-rw-r--r--src/modules/findgame.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/findgame.js b/src/modules/findgame.js
index 1c330df..505595f 100644
--- a/src/modules/findgame.js
+++ b/src/modules/findgame.js
@@ -6,6 +6,8 @@ const { app } = require("electron");
const util = require("util");
const exec = util.promisify(require("child_process").exec);
+console = require("./console");
+
module.exports = async () => {
let gamepath = "";
@@ -40,10 +42,10 @@ module.exports = async () => {
let data_array = Object.values(values[i]);
if (fs.existsSync(data_array[0] + "/steamapps/common/Titanfall2/Titanfall2.exe")) {
- console.log("Found game in:", data_array[0]);
+ console.ok("Found game in:", data_array[0]);
return data_array[0] + "/steamapps/common/Titanfall2";
} else {
- console.log("Game not in:", data_array[0]);
+ console.error("Game not in:", data_array[0]);
}
}
}
@@ -70,7 +72,7 @@ module.exports = async () => {
// searches VDF files
for (let i = 0; i < vdf_files.length; i++) {
if (! fs.existsSync(vdf_files[i])) {continue}
- console.log("Searching VDF file at:", vdf_files[i]);
+ console.info("Searching VDF file at:", vdf_files[i]);
let data = fs.readFileSync(vdf_files[i]);
let read_vdf = readvdf(data.toString());