Skip to content

Commit

Permalink
fixed pack mod not working ack
Browse files Browse the repository at this point in the history
  • Loading branch information
khbsd committed May 31, 2024
1 parent ece4c68 commit edc5dfe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
8 changes: 7 additions & 1 deletion support_files/loca_convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ var to_loca;
var LSLIB;

async function lslib_load() {
LSLIB = await LOAD_LSLIB();
if (LSLIB === undefined) {
raiseInfo("lslib not found. loading...", false);
LSLIB = await LOAD_LSLIB();
// console.log(typeof(LSLIB))
} else {
raiseInfo("lslib is already loaded!", false);
}
}


Expand Down
8 changes: 7 additions & 1 deletion support_files/lsf_convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ var to_lsf;
var LSLIB;

async function lslib_load() {
LSLIB = await LOAD_LSLIB();
if (LSLIB === undefined) {
console.log("lslib not found. loading...");
LSLIB = await LOAD_LSLIB();
// console.log(typeof(LSLIB))
} else {
console.log("lslib is already loaded!");
}
}


Expand Down
9 changes: 4 additions & 5 deletions support_files/process_pak.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (isMainThread) {
function prepareTempDir(movedPak = false) {
let rootModPath;
if (isMainThread) {
rootModPath = getConfig().rootModPath;
rootModPath = getConfig.rootModPath;
} else {
rootModPath = getConfig.rootModPath;
}
Expand All @@ -45,8 +45,6 @@ function prepareTempDir(movedPak = false) {

const temp_path = path.join(rootParentPath, temp_folder);
// console.log('test11')
console.log(rootParentPath)
console.log(rootModPath)
if (!(fs.existsSync(temp_path))) {
console.log("making temp_path");
fs.mkdirSync(temp_path, { recursive: true});
Expand Down Expand Up @@ -75,8 +73,8 @@ async function processPak(modPath, modName, unpackLocation = path.join(path.dirn
let rootModPath, modDestPath;

if (isMainThread) {
rootModPath = getConfig().rootModPath;
modDestPath = getConfig().modDestPath;
rootModPath = getConfig.rootModPath;
modDestPath = getConfig.modDestPath;

} else {
rootModPath = getConfig.rootModPath;
Expand Down Expand Up @@ -130,4 +128,5 @@ async function processPak(modPath, modName, unpackLocation = path.join(path.dirn
}
}

lslib_load();
module.exports = { processPak, prepareTempDir };

0 comments on commit edc5dfe

Please sign in to comment.