diff --git a/assets/jsons/bs-versions.json b/assets/jsons/bs-versions.json index 7da303ce..e66b9a5c 100644 --- a/assets/jsons/bs-versions.json +++ b/assets/jsons/bs-versions.json @@ -813,5 +813,14 @@ "ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/65df6b24c3b8a7f415080ac01394917cedabf9fc.png", "ReleaseDate": "1733846128", "year": "2024" + }, + { + "BSVersion": "1.40.1", + "BSManifest": "8655702238937650396", + "OculusBinaryId": "8526525354113835", + "ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/510696972023234581", + "ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/5cc1ca353151ed31da2764716cdcbe89442aeeeb.png", + "ReleaseDate": "1738144954", + "year": "2025" } ] \ No newline at end of file diff --git a/src/main/services/bs-launcher/abstract-launcher.service.ts b/src/main/services/bs-launcher/abstract-launcher.service.ts index 0399e3f1..b1622d65 100644 --- a/src/main/services/bs-launcher/abstract-launcher.service.ts +++ b/src/main/services/bs-launcher/abstract-launcher.service.ts @@ -139,9 +139,11 @@ export abstract class AbstractLauncherService { for (const [ key, value ] of Object.entries(parseEnvString(envString))) { if (key in env) { log.warn("Ignoring", `${key}=${value}`, "already set env launch command"); - } else { - log.info("Injecting", `${key}="${value}"`, "to the env launch command"); + continue; } + + log.info("Injecting", `${key}="${value}"`, "to the env launch command"); + env[key] = value; } launchOptions.command = command.substring(index + this.COMMAND_FORMAT.length); diff --git a/src/main/services/mods/bs-mods-manager.service.ts b/src/main/services/mods/bs-mods-manager.service.ts index 74897c44..260d3d50 100644 --- a/src/main/services/mods/bs-mods-manager.service.ts +++ b/src/main/services/mods/bs-mods-manager.service.ts @@ -531,9 +531,11 @@ export class BsModsManagerService { const versionMods = await this.getAvailableMods(version); const installedMods = await this.getInstalledMods(version); - const fullInstalledMods: BbmFullMod[] = installedMods?.map(version => { - return { version, mod: versionMods.find(mod => version.modId === mod.mod.id)?.mod }; - }) ?? []; + const fullInstalledMods = (installedMods || []).reduce((mods, version) => { + const mod = versionMods.find(mod => version.modId === mod.mod.id)?.mod; + if (mod) { mods.push({ version, mod }); } + return mods; + }, [] as BbmFullMod[]); const progress = { current: 0, total: fullInstalledMods.length };