From 5d86a3daa5f762326055469b6bcd8346e0655056 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sun, 5 Mar 2023 00:25:07 +0100 Subject: modularized many functions and got rid of utils.js Notably, winLog() and winAlert() are now win.log() and win.alert() inside modules/window.js. updateViper(), updateNorthstar and handleNorthstarUpdating() are now update.viper(), update.northstar() and update.northstar_autoupdate(), inside modules/update.js isGameRunning() and isOriginRunning() are now is_running.origin() and is_running.game() inside modules/is_running.js, along with a .titanfall() and .northstar() for more specificity. Not used anywhere right now, but may in the future be used. setpath() and gamepathExists() are now gamepath.set() and gamepath.exists() inside modules/gamepath.js killOrigin() are now kill.origin() inside modules/kill.js setlang() is now just inlined into the only event where it's used. --- src/app/main.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/app') diff --git a/src/app/main.js b/src/app/main.js index a9329fa..1c846b4 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -1,6 +1,6 @@ const fs = require("fs"); const path = require("path"); -const { ipcRenderer, shell, ipcMain } = require("electron"); +const { ipcRenderer, shell } = require("electron"); const lang = require("../lang"); var modsobj = {}; @@ -90,11 +90,7 @@ function launch() { // Tells the main process to launch the vanilla game function launchVanilla() {ipcRenderer.send("launch-vanilla")} -// In conjunction with utils.js' winLog(), it'll send log messages in -// the devTools from utils.js -function log(msg) { - console.log(msg); -} +let log = console.log; // Disables or enables certain buttons when for example // updating/installing Northstar. -- cgit v1.2.3