Skip to content

Commit

Permalink
remove workerpool dep, need something else i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
khbsd committed May 23, 2024
1 parent 25a9721 commit f2be15c
Show file tree
Hide file tree
Showing 46 changed files with 43 additions and 5,691 deletions.
24 changes: 3 additions & 21 deletions commands/debug2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const vscode = require('vscode');
const fs = require('fs');
const os = require('os');

const { Worker, isMainThread, parentPort } = require('worker_threads');
const path = require('path');

const LSLIB_DLL = 'LSLib.dll';
Expand All @@ -13,30 +12,13 @@ const { lslibPath, rootModPath } = getConfig();
const compatRootModPath = path.join(rootModPath + "\\");
const lslibToolsPath = path.join(lslibPath, TOOL_SUBDIR);

const { CREATE_LOGGER, raiseError, raiseInfo } = require('../support_files/log_utils.js');
const bg3mh_logger = CREATE_LOGGER();

const { FIND_FILES, getFormats } = require('../support_files/lslib_utils.js');

const debug2 = vscode.commands.registerCommand('bg3-mod-helper.debug2Command', async function () {
const config = getConfig();
const localizationPath = path.join(config.rootModPath, 'Localization');
let halfCoreCount = os.availableParallelism() / 2;

// raiseInfo(`half of your cpu's cores: ${halfCoreCount}`);

try {
console.log(await FIND_FILES(getFormats().lsx));
}
catch (err) {
console.error(err);
}


// after you are through with this command, the following line must be uncommented and the only thing left for this file to be considered cleaned up.
// raiseInfo("hi dipshit :)");


// const vscode = require('vscode');
});

module.exports = debug2;
module.exports = { debug2 }
5 changes: 2 additions & 3 deletions commands/packMod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path');
const fs = require('fs');

const { exec } = require('child_process');
const { getConfig } = require('../support_files/config');
const { getConfig, getModName } = require('../support_files/config');
const { rootModPath } = getConfig();

const { CREATE_LOGGER, raiseError, raiseInfo } = require('../support_files/log_utils');
Expand All @@ -14,7 +14,6 @@ const vscodeDirPath = path.join(rootModPath, '.vscode');
const { v4: uuidv4 } = require('uuid');

const { convert } = require('../support_files/conversion_junction.js');
const { getModName } = require('../support_files/helper_functions.js');
const { getFormats } = require('../support_files/lslib_utils.js');
const { pak } = getFormats();

Expand All @@ -23,7 +22,7 @@ const { pak } = getFormats();
const packModCommand = vscode.commands.registerCommand('bg3-mod-helper.packMod', async function () {
raiseInfo("pack button clicked");
const { rootModPath, modDestPath, lslibPath, autoLaunchOnPack } = getConfig();
const modName = await getModName();
const modName = getModName();

const modsDirPath = path.normalize(rootModPath + "\\Mods");
const metaPath = path.normalize(modsDirPath + "\\" + modName + "\\meta.lsx");
Expand Down
13 changes: 2 additions & 11 deletions commands/worker_test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
const { CREATE_LOGGER, raiseError, raiseInfo } = require('../support_files/log_utils.js');
const bg3mh_logger = CREATE_LOGGER();

const { parentPort } = require('worker_threads');

function test_func() {
raiseInfo("hi dipshit :)");
return "hi dipshit :)";

}

// const { CREATE_LOGGER, raiseError, raiseInfo } = require('../support_files/log_utils.js');
// const bg3mh_logger = CREATE_LOGGER();

7 changes: 1 addition & 6 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f2be15c

Please sign in to comment.