diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 8aea78e9..54ad29b9 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "bg3-mod-helper", - "version": "2.1.51", + "version": "3.3.0", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package-lock.json b/package-lock.json index b343e4b2..6ecbcc6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bg3-mod-helper", - "version": "2.1.51", + "version": "3.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bg3-mod-helper", - "version": "2.1.51", + "version": "3.3.0", "license": "LGPL-3.0-or-later", "dependencies": { "log4js": "^6.9.1", diff --git a/package.json b/package.json index e5db620b..91ae2d5a 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.51", + "version": "3.3.0", "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 1d06d435..0f2afed4 100644 --- a/support_files/conversion_junction.js +++ b/support_files/conversion_junction.js @@ -59,11 +59,14 @@ function convert(convertPath, targetExt = path.extname(getDynamicPath(convertPat return normalizedExcludedFiles.includes(normalizedFile); }; */ + const { rootModPath } = getConfig(); + console.log(rootModPath); if (targetExt === pak) { prepareTempDir(); // changed these back, hope that's okay + console.log(rootModPath); convert(rootModPath, xml); convert(rootModPath, lsx); processPak(rootModPath, modName_); diff --git a/support_files/lslib_utils.js b/support_files/lslib_utils.js index cc153668..8d0c7a7a 100644 --- a/support_files/lslib_utils.js +++ b/support_files/lslib_utils.js @@ -33,7 +33,10 @@ const converterAppDll = ['ConverterApp.dll']; const illegalDlls = [].concat(elasticDlls, storyCompilerDlls, converterAppDll); // the list of directories that need lsx > lsf conversion -const convertDirs = ["[PAK]", "RootTemplates", "MultiEffectInfos", "UI", "Effects", "LevelMapValues", "Localization"]; +const convertDirs = ["[PAK]_UI", "[PAK]_Armor", "RootTemplates", "MultiEffectInfos", "Assets", "UI", "Effects", "LevelMapValues", "Localization"]; + +// excluding this because it will match to "UI" in convertDirs +const illegalFiles = ["Icons_Items.lsx"]; var DLLS = []; var DLL_PATHS = []; @@ -144,10 +147,14 @@ function LOAD_LSLIB() { function FIND_FILES(filesPath, targetExt = getFormats().lsf, isRecursive = true) { let filesToConvert = []; + console.log(filesPath); + console.log(targetExt); + const filesList = fs.readdirSync(filesPath, { withFileTypes: false, recursive: isRecursive }); + console.log(filesList); for (let i = 0; i < filesList.length; i++) { const temp = filesList[i].toString(); @@ -180,7 +187,16 @@ function FILTER_PATHS(filesPath) { let temp_ext = path.extname(filesPath); for (let i = 0; i < temp_path.length; i++) { - if ((!excludedFiles.includes(filesPath) && convertDirs.includes(temp_path[i])) || (temp_ext === getFormats().dll && !illegalDlls.includes(path.basename(filesPath)))) { + if (temp_ext === getFormats().dll && !illegalDlls.includes(path.basename(filesPath))) { + return filesPath; + } + else if ( + ( + !excludedFiles.includes(filesPath) && + convertDirs.includes(temp_path[i]) && + !illegalFiles.includes(path.basename(filesPath)) + ) + ) { return filesPath; } } diff --git a/support_files/pack_mod.js b/support_files/pack_mod.js index e2b80287..6a7fffa6 100644 --- a/support_files/pack_mod.js +++ b/support_files/pack_mod.js @@ -13,14 +13,16 @@ const { rootModPath, modDestPath } = getConfig(); const rootParentPath = path.dirname(rootModPath); const temp_folder = "\\temp_folder"; -const temp_path = path.join(rootParentPath, temp_folder); +const temp_path = rootModPath; +// const temp_path = path.join(rootParentPath, temp_folder); + function prepareTempDir(movedPak = false) { if (!(fs.existsSync(temp_path))) { console.log("making temp_path"); - fs.mkdirSync(temp_path, { recursive: true}); + // fs.mkdirSync(temp_path, { recursive: true}); return; } // this is being finicky :starege: