From 11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sat, 22 Jul 2023 16:09:41 +0200 Subject: colored console logging Far prettier, and far more useful at a glance. --- src/modules/findgame.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/modules/findgame.js') 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()); -- cgit v1.2.3