diff --git a/CHANGELOG.md b/CHANGELOG.md index 947ff11..0b98212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.10.3] - 2024-11-07 +- Fixed engine injectors (SFSE excluded) being erroneously flagged as the Game Pass ASI Loader + ## [1.10.2] - 2024-09-30 - Fixed CC plugins being detected as native. diff --git a/package.json b/package.json index 4e08a28..a425245 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "starfield", - "version": "1.10.2", + "version": "1.10.3", "description": "Vortex Extension for Starfield", "author": "Nexus Mods", "private": true, diff --git a/src/index.ts b/src/index.ts index 9e78ace..0cdd486 100644 --- a/src/index.ts +++ b/src/index.ts @@ -179,27 +179,15 @@ function main(context: types.IExtensionContext) { context.registerInstaller('starfield-sfse-installer', 25, testSFSESupported as any, (files) => installSFSE(context.api, files) as any); context.registerInstaller('starfield-asi-mod-installer', 20, testASIModSupported as any, (files) => installASIMod(context.api, files) as any); - context.registerInstaller('starfield-asi-loader-installer', 25, testASILoaderSupported as any, (files) => installASILoader(context.api, files) as any); + context.registerInstaller('starfield-asi-loader-installer', 25, + (files, gameId) => testASILoaderSupported(context.api, files, gameId) as any, + (files) => installASILoader(context.api, files) as any); context.registerAction('mod-icons', 500, 'open-ext', {}, 'Open Game Settings Folder', openSettingsPath, (gameId?: string[]) => isStarfield(context, gameId)); context.registerAction('mod-icons', 500, 'open-ext', {}, 'Open Game Application Data Folder', openAppDataPath, (gameId?: string[]) => isStarfield(context, gameId)); context.registerAction('fb-load-order-icons', 150, 'open-ext', {}, 'View Plugins File', openAppDataPath, (gameId?: string[]) => isStarfield(context, gameId)); - context.registerAction( - 'fb-load-order-icons', - 500, - 'remove', - {}, - 'Reset Plugins File', - () => removePluginsWrap(context.api), - (gameId?: string[]) => isStarfield(context, gameId) - ); - context.registerAction( - 'fb-load-order-icons', - 600, - 'loot-sort', - {}, - 'Sort via LOOT', - () => { + context.registerAction('fb-load-order-icons', 500, 'remove', {}, 'Reset Plugins File', () => removePluginsWrap(context.api), (gameId?: string[]) => isStarfield(context, gameId)); + context.registerAction('fb-load-order-icons', 600, 'loot-sort', {}, 'Sort via LOOT', () => { lootSort(context.api) }, (gameId?: string[]) => isStarfield(context, gameId) && lootSortingAllowed(context.api) diff --git a/src/installers/starfield-asi-installer.ts b/src/installers/starfield-asi-installer.ts index f86ad21..c9c943d 100644 --- a/src/installers/starfield-asi-installer.ts +++ b/src/installers/starfield-asi-installer.ts @@ -6,14 +6,26 @@ import { MOD_TYPE_ASI_MOD, ASI_EXT, ASI_LOADER_ASSEMBLIES, GAME_ID, TARGET_ASI_L const findAsiLoader = (files: string[]): string | undefined => files.find(f => ASI_LOADER_ASSEMBLIES.includes(path.basename(f).toLowerCase())); -export function testASILoaderSupported(files: string[], gameId: string): Promise { +export async function testASILoaderSupported(api: types.IExtensionApi, files: string[], gameId: string): Promise { if (gameId !== GAME_ID) { return Promise.resolve({ supported: false, requiredFiles: [] }); } - const supported = findAsiLoader(files) !== undefined; + let supported = findAsiLoader(files) !== undefined; + const t = api.translate; + if (supported) { + await api.showDialog('question', 'Install Injector/Loader', { + bbcode: t('The mod you are installing appears to be an ASI Loader or another type of code Injector.{{bl}}' + + 'Due to the modding pattern for "{{gameName}}". Vortex can\'t discern if this is the Game Pass ASI Loader ' + + 'or some other type of code injection/loading library.{{bl}}' + + 'Please select the correct option.', { replace: { gameName: 'Starfield', bl: '[br][/br][br][/br]' } }), + },[ + { label: 'A Code Injector', action: () => { supported = false } }, + { label: 'Game Pass ASI Loader', action: () => { supported = true }} + ],'sf-is-asi-loader-notif'); + } return Promise.resolve({ supported, - requiredFiles: [] + requiredFiles: [], }); }