[qol] install only mods not already installed (not finished)

This commit is contained in:
MathieuG-P
2024-07-28 21:40:09 +02:00
parent c96ad6f7cd
commit 152313289c
5 changed files with 51 additions and 42 deletions
@@ -346,15 +346,12 @@ export class BsModsManagerService {
throw CustomError.fromError(new Error("No mods to install"), "no-mods");
}
const deps = await this.resolveDependencies(mods, version);
mods.push(...deps);
const bsipa = mods.find(mod => mod.name.toLowerCase() === "bsipa");
if (bsipa) {
mods = mods.filter(mod => mod.name.toLowerCase() !== "bsipa");
}
this.nbModsToInstall = mods.length + (bsipa && 1);
this.nbModsToInstall = mods.length + (bsipa ? 1 : 0);
this.nbInstalledMods = 0;
if (bsipa) {