diff options
author | 0neGal <mail@0negal.com> | 2023-07-24 17:48:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 17:48:07 +0200 |
commit | 306e09311b681afecdf2f1063a10ad87e63f5b7a (patch) | |
tree | d8905b4c651cf762c46f595879751d4334cdb893 /src/modules/findgame.js | |
parent | d69162ff55b83c8bfe8f855b74785038c4662051 (diff) | |
parent | 11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02 (diff) | |
download | Viper-306e09311b681afecdf2f1063a10ad87e63f5b7a.tar.gz Viper-306e09311b681afecdf2f1063a10ad87e63f5b7a.zip |
Merge branch 'main' into add-missing-localizations
Diffstat (limited to 'src/modules/findgame.js')
-rw-r--r-- | src/modules/findgame.js | 8 |
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()); |