aboutsummaryrefslogtreecommitdiff
path: root/src/modules/findgame.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-07-24 18:01:25 +0200
committerGitHub <noreply@github.com>2023-07-24 18:01:25 +0200
commit4e870f414cd4a85c4fca29bf4eb6f79f1aa89487 (patch)
treec9c1731b43861fcfcc7e15237a7924d8f4ecf21d /src/modules/findgame.js
parent5cf79aa0847831b573a52d3c147ca1f78e712a40 (diff)
parent112610902caef019ea4af17d77079cd090d6b9b5 (diff)
downloadViper-4e870f414cd4a85c4fca29bf4eb6f79f1aa89487.tar.gz
Viper-4e870f414cd4a85c4fca29bf4eb6f79f1aa89487.zip
Merge branch 'main' into packages-dir
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());