-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from BUTR/dev
Release 1.1.0
- Loading branch information
Showing
149 changed files
with
4,907 additions
and
3,327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,69 @@ | ||
{ | ||
"name": "NodeJS & Powershell & 7z", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"cacheFrom": [ | ||
"ghcr.io/butr/game-mount-and-blade2-devcontainer:latest" | ||
] | ||
}, | ||
"features": { | ||
"ghcr.io/butr/devcontainer/upgrade:1": { | ||
|
||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "latest", | ||
"ppa": "false" | ||
"name": "NodeJS & Powershell & 7z", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"cacheFrom": [ | ||
"ghcr.io/butr/game-mount-and-blade2-devcontainer:latest" | ||
] | ||
}, | ||
"ghcr.io/butr/devcontainer/7z:1": { | ||
"features": { | ||
"ghcr.io/butr/devcontainer/upgrade:1": { | ||
|
||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "latest", | ||
"ppa": "false" | ||
}, | ||
"ghcr.io/butr/devcontainer/7z:1": { | ||
|
||
}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "18.17.1", | ||
"nodeGypDependencies": "true" | ||
}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "18.17.1", | ||
"nodeGypDependencies": "true" | ||
}, | ||
"ghcr.io/devcontainers/features/python:1": { | ||
|
||
}, | ||
"ghcr.io/devcontainers/features/powershell:1": { | ||
"version": "7.4.2" | ||
} | ||
}, | ||
"ghcr.io/devcontainers/features/powershell:1": { | ||
"version": "latest" | ||
} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/butr/devcontainer/upgrade", | ||
"ghcr.io/devcontainers/features/git", | ||
"ghcr.io/butr/devcontainer/7z", | ||
"ghcr.io/devcontainers/features/node", | ||
"ghcr.io/devcontainers/features/powershell" | ||
], | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/butr/devcontainer/upgrade", | ||
"ghcr.io/devcontainers/features/git", | ||
"ghcr.io/butr/devcontainer/7z", | ||
"ghcr.io/devcontainers/features/node", | ||
"ghcr.io/devcontainers/features/python", | ||
"ghcr.io/devcontainers/features/powershell" | ||
], | ||
"mounts": [ | ||
{ | ||
"source":"${localEnv:HOME}${localEnv:USERPROFILE}/AppData/Roaming/Vortex/plugins", | ||
"target":"/vortex-plugins", | ||
"type":"bind" | ||
} | ||
], | ||
"postAttachCommand": "yarn install", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"github.vscode-github-actions", | ||
"ms-vscode.powershell", | ||
"ms-azuretools.vscode-docker" | ||
], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "pwsh", | ||
"terminal.integrated.profiles.linux": { | ||
"path": { | ||
"path": "/usr/local/bin/pwsh" | ||
} | ||
}, | ||
"powershell.powerShellAdditionalExePaths": { | ||
"pwsh": "/usr/local/bin/pwsh" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"postAttachCommand": "yarn install", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"github.vscode-github-actions", | ||
"ms-vscode.powershell", | ||
"ms-azuretools.vscode-docker" | ||
], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "pwsh", | ||
"terminal.integrated.profiles.linux": { | ||
"path": { | ||
"path": "/usr/local/bin/pwsh" | ||
} | ||
}, | ||
"powershell.powerShellAdditionalExePaths": { | ||
"pwsh": "/usr/local/bin/pwsh" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# Project-specific editor formatting options | ||
[*] | ||
charset = utf-8 | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { actions, types } from 'vortex-api'; | ||
import { findBLSEMod } from './utils'; | ||
import { hasSettingsInterfacePrimaryTool } from '../vortex'; | ||
import { GAME_ID } from '../common'; | ||
|
||
export const didDeployBLSE = (api: types.IExtensionApi): Promise<void> => { | ||
const state = api.getState(); | ||
|
||
if (!hasSettingsInterfacePrimaryTool(state.settings.interface)) { | ||
return Promise.resolve(); | ||
} | ||
|
||
const primaryTool = state.settings.interface.primaryTool.mountandblade2bannerlord; | ||
|
||
const blseMod = findBLSEMod(state); | ||
if (blseMod && primaryTool === undefined) { | ||
api.store?.dispatch(actions.setPrimaryTool(GAME_ID, 'blse-cli')); | ||
} | ||
if (!blseMod && primaryTool === 'blse-cli') { | ||
api.store?.dispatch(actions.setPrimaryTool(GAME_ID, undefined!)); | ||
} | ||
|
||
return Promise.resolve(); | ||
}; | ||
|
||
/** | ||
* Event function, be careful | ||
*/ | ||
export const didPurgeBLSE = (api: types.IExtensionApi): Promise<void> => { | ||
const state = api.getState(); | ||
|
||
if (!hasSettingsInterfacePrimaryTool(state.settings.interface)) { | ||
return Promise.resolve(); | ||
} | ||
|
||
const primaryTool = state.settings.interface.primaryTool.mountandblade2bannerlord; | ||
if (primaryTool !== 'blse-cli') { | ||
return Promise.resolve(); | ||
} | ||
|
||
const blseMod = findBLSEMod(state); | ||
if (blseMod) { | ||
api.store?.dispatch(actions.setPrimaryTool(GAME_ID, undefined!)); | ||
} | ||
|
||
return Promise.resolve(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './events'; | ||
export * from './installer'; | ||
export * from './modType'; | ||
export * from './utils'; | ||
export * from './vortex'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { selectors, types } from 'vortex-api'; | ||
import { BLSE_CLI_EXE } from '../../common'; | ||
import { BLSE_CLI_EXE } from '../common'; | ||
|
||
export const getInstallPathBLSE = (api: types.IExtensionApi, game: types.IGame): string => { | ||
const discovery: types.IDiscoveryResult | undefined = selectors.discoveryByGame(api.getState(), game.id); | ||
return discovery?.path ?? ``; | ||
}; | ||
|
||
export const isModTypeBLSE = (instructions: types.IInstruction[]): boolean => { | ||
return instructions.some((inst) => inst.type === 'copy' && inst.source && inst.source.endsWith(BLSE_CLI_EXE)); | ||
return instructions.some( | ||
(inst) => inst.type === 'copy' && inst.source !== undefined && inst.source.endsWith(BLSE_CLI_EXE) | ||
); | ||
}; |
Oops, something went wrong.