From f2e2b55faa528e7addb27990b2a5ec86b30512a0 Mon Sep 17 00:00:00 2001 From: ghostboats <106226990+ghostboats@users.noreply.github.com> Date: Tue, 21 May 2024 00:34:59 -0500 Subject: [PATCH] i shouldnt push this, please go back to previous commit if something not working --- node_modules/.package-lock.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- support_files/conversion_junction.js | 5 ++++- support_files/pack_mod.js | 11 ++++++++--- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 19f5a394..aff8ea05 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "bg3-mod-helper", - "version": "2.1.61", + "version": "2.1.62", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package-lock.json b/package-lock.json index a7f81e33..e6593f4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bg3-mod-helper", - "version": "2.1.61", + "version": "2.1.62", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bg3-mod-helper", - "version": "2.1.61", + "version": "2.1.62", "license": "LGPL-3.0-or-later", "dependencies": { "log4js": "^6.9.1", diff --git a/package.json b/package.json index 362c2cbb..3ff70242 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "bg3_mod_helper", "publisher": "ghostboats", "description": "This extension is designed to help you make mods in Baldur's Gate 3 by creating UUIDs and handles for you, as well as updating your .loca.xml files as well should they exist. And more to come in the future.", - "version": "2.1.61", + "version": "2.1.62", "icon": "media/marketplace_icon.png", "engines": { "vscode": "^1.86.0" diff --git a/support_files/conversion_junction.js b/support_files/conversion_junction.js index 479faec6..0b378e10 100644 --- a/support_files/conversion_junction.js +++ b/support_files/conversion_junction.js @@ -10,7 +10,6 @@ const { CREATE_LOGGER, raiseError, raiseInfo } = require('./log_utils'); const bg3mh_logger = CREATE_LOGGER(); const { getConfig } = require('./config.js'); -const { rootModPath } = getConfig(); const { isLoca, processLoca, getLocaOutputPath } = require('./loca_convert'); const { isLsf, processLsf, getLsfOutputPath } = require('./lsf_convert'); @@ -43,6 +42,8 @@ function getDynamicPath(filePath) { function convert(convertPath, targetExt = path.extname(getDynamicPath(convertPath)), modName_ = '') { + console.log('targetExt:' + targetExt) + const { rootModPath } = getConfig(); if (targetExt === "empty") { return; } @@ -69,6 +70,7 @@ function convert(convertPath, targetExt = path.extname(getDynamicPath(convertPat processPak(rootModPath, modName_); } else if (Array.isArray(convertPath)) { + console.log('array1') for (let i = 0; i < convertPath.length; i++) { convert(convertPath[i], path.extname(convertPath[i])); bg3mh_logger.info(`Excluded: ${convertPath[i]}`); @@ -101,6 +103,7 @@ function convert(convertPath, targetExt = path.extname(getDynamicPath(convertPat } } else { + console.log('here???') raiseInfo(`Excluded: ${convertPath}`, false); } } diff --git a/support_files/pack_mod.js b/support_files/pack_mod.js index a51d74ef..9b83e312 100644 --- a/support_files/pack_mod.js +++ b/support_files/pack_mod.js @@ -9,15 +9,17 @@ const { CREATE_LOGGER, raiseError, raiseInfo } = require('./log_utils'); var bg3mh_logger = CREATE_LOGGER(); const { getConfig } = require('./config.js'); -const { rootModPath, modDestPath } = getConfig(); -const rootParentPath = path.dirname(rootModPath); const temp_folder = "\\temp_folder"; -const temp_path = path.join(rootParentPath, temp_folder); + function prepareTempDir(movedPak = false) { + const { rootModPath } = getConfig(); + const rootParentPath = path.dirname(rootModPath); + + const temp_path = path.join(rootParentPath, temp_folder); console.log('test11') console.log(rootParentPath) console.log(rootModPath) @@ -43,9 +45,12 @@ function prepareTempDir(movedPak = false) { // btw, sometimes this will log things before others because it's async. async function processPak(modPath, modName_) { console.log('check') + const { rootModPath, modDestPath } = getConfig(); var build = new LSLIB.PackageBuildData(); var Packager = new LSLIB.Packager(); const lastFolderName = path.basename(rootModPath); + const rootParentPath = path.dirname(rootModPath); + const temp_path = path.join(rootParentPath, temp_folder); const modFinalDestPath = path.join(modDestPath, lastFolderName + pak); const modTempDestPath = path.join(temp_path, lastFolderName + pak);