Skip to content

Commit

Permalink
fixed attempts to update manual file overrides (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
IDCs authored Feb 19, 2024
1 parent 0afac25 commit a87acf6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mod-dependency-manager",
"version": "0.2.3",
"version": "0.2.4",
"description": "Control mod dependencies through drag&drop",
"main": "./out/index.js",
"repository": "",
Expand Down
7 changes: 6 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ function updateOverrides(api: types.IExtensionApi, gameMode: string): void {
const modsWithOverrides: OverrideByMod = Object.entries(enabled).reduce((accum, [modId, mod]) => {
if (mod.fileOverrides !== undefined) {
for (const fileName of mod.fileOverrides) {
const knownConflict = knownConflicts[modId].find(c => c.files.includes(fileName));
const conflictsForModId = knownConflicts[modId];
if (conflictsForModId === undefined) {
// No conflicts for this modId? This is a manual override, leave it be.
continue;
}
const knownConflict = conflictsForModId.find(c => c.files.includes(fileName));
if (knownConflict !== undefined && !mods[knownConflict.otherMod.id].fileOverrides.includes(fileName)) {
continue;
}
Expand Down

0 comments on commit a87acf6

Please sign in to comment.