diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..9c11400 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,26 @@ +--------------------------------------------------------------------------------------------------- +Version: 1.0.7 +* Fixed the tool warning +* Fixed the tools lacking CLI args +* Fixed "game not found" +--------------------------------------------------------------------------------------------------- +Version: 1.0.6 +* Fixed unexpected undefined module infos, should fix most of the issues we had reported +--------------------------------------------------------------------------------------------------- +Version: 1.0.5 +* Fixed BOM handling +--------------------------------------------------------------------------------------------------- +Version: 1.0.4 +* Added extension version log just in case +--------------------------------------------------------------------------------------------------- +Version: 1.0.3 +* More Validation issues fixed, some exceptions now log an error instead of propagating it +* Do not throw on faulty mod metadata +--------------------------------------------------------------------------------------------------- +Version: 1.0.2 +* Validation fixes +* Load Order not being an array fix +--------------------------------------------------------------------------------------------------- +Version: 1.0.0 +* Initial release +--------------------------------------------------------------------------------------------------- diff --git a/package.json b/package.json index 3a710ec..e4d90fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "game-mount-and-blade-ii-bannerlord-butr", - "version": "1.0.6", + "version": "1.0.7", "description": "A Vortex extension for Mount and Blade II: Bannerlord mod management.", "author": "BUTR Team & Nexus Mods", "license": "GPL-3.0+", diff --git a/src/index.ts b/src/index.ts index 1d7fa97..2ec5b4d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,6 @@ import { didDeployBLSE, didPurgeBLSE, addedFiles, - ModAnalyzerProxy, } from './utils'; import { SaveList, SavePageOptions, Settings } from './views'; import { IAddedFiles } from './types'; diff --git a/src/utils/loadOrder/manager.tsx b/src/utils/loadOrder/manager.tsx index 22c535e..061c39c 100644 --- a/src/utils/loadOrder/manager.tsx +++ b/src/utils/loadOrder/manager.tsx @@ -9,7 +9,7 @@ import { ModAnalyzerProxy, VortexLauncherManager, versionToString, -} from '../'; +} from '..'; import { GAME_ID } from '../../common'; import { LoadOrderInfoPanel, BannerlordItemRenderer } from '../../views'; import { IModuleCompatibilityInfoCache, RequiredProperties, VortexLoadOrderStorage } from '../../types'; diff --git a/src/utils/loadOrder/persistence.ts b/src/utils/loadOrder/persistence.ts index cebffdb..b664786 100644 --- a/src/utils/loadOrder/persistence.ts +++ b/src/utils/loadOrder/persistence.ts @@ -23,7 +23,7 @@ export const readLoadOrder = (api: types.IExtensionApi): PersistenceLoadOrderSto const loFileName = getLoadOrderFileName(profileId); const loFilePath = getLoadOrderFilePath(api, loFileName); const fileContents = fs.readFileSync(loFilePath, 'utf8'); - + const loadOrder: PersistenceLoadOrderStorage = JSON.parse(fileContents); return loadOrder.filter((x) => !!x && filterEntryWithInvalidId(x)); } catch { diff --git a/src/utils/tools.ts b/src/utils/tools.ts index f03fe38..0630e52 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -49,7 +49,8 @@ export const addBLSETools = async (api: types.IExtensionApi, discovery: types.ID workingDirectory: path.join(discovery.path, pathBase), hidden: false, custom: true, - defaultPrimary: id === `blse-cli`, + defaultPrimary: false, // setting as true whn not installed causes a warning + //defaultPrimary: id === `blse-cli`, }; addDiscoveredTool(api, tool); } diff --git a/src/utils/util.ts b/src/utils/util.ts index dec0339..4e7d707 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -14,7 +14,7 @@ export const findGame = async (): Promise => { type HasId = { id: string; -} +}; const hasId = (persistent: HasId): persistent is HasId => { return !!persistent.id && persistent.id !== ''; }; diff --git a/src/utils/vortexLauncherManager.ts b/src/utils/vortexLauncherManager.ts index 3720967..8c40ec4 100644 --- a/src/utils/vortexLauncherManager.ts +++ b/src/utils/vortexLauncherManager.ts @@ -285,6 +285,13 @@ export class VortexLauncherManager { * Callback */ private setGameParameters = (_executable: string, gameParameters: string[]): void => { + const discovery = selectors.currentGameDiscovery(this._api.getState()); + Object.values(discovery.tools ?? {}).forEach((tool) => { + if (tool.id && tool.id.endsWith('-cli')) { + tool.parameters = gameParameters; + } + }); + this._api.store?.dispatch(actions.setGameParameters(GAME_ID, { parameters: gameParameters })); }; /**