Skip to content

Commit

Permalink
Merge pull request #114 from BUTR/dev
Browse files Browse the repository at this point in the history
Release 1.0.7
  • Loading branch information
Aragas authored May 30, 2024
2 parents 7b239cf + 509336c commit dc5913c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 6 deletions.
26 changes: 26 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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
---------------------------------------------------------------------------------------------------
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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+",
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
didDeployBLSE,
didPurgeBLSE,
addedFiles,
ModAnalyzerProxy,
} from './utils';
import { SaveList, SavePageOptions, Settings } from './views';
import { IAddedFiles } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/loadOrder/manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/loadOrder/persistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion src/utils/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const findGame = async (): Promise<types.IGameStoreEntry> => {

type HasId = {
id: string;
}
};
const hasId = (persistent: HasId): persistent is HasId => {
return !!persistent.id && persistent.id !== '';
};
Expand Down
7 changes: 7 additions & 0 deletions src/utils/vortexLauncherManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }));
};
/**
Expand Down

0 comments on commit dc5913c

Please sign in to comment.