Override GOG installDir for The Witch's Love Diary

This commit is contained in:
mtkennerly 2023-11-23 15:38:54 +08:00
parent f944b9f1c9
commit b5392a4ae3
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
3 changed files with 21 additions and 4 deletions

View file

@ -14,3 +14,7 @@ Overwatch:
# and its save locations are identical to Counter Strike 2, # and its save locations are identical to Counter Strike 2,
# leading to duplicate backups. # leading to duplicate backups.
omit: true omit: true
The Witch's Love Diary:
installDir:
# GOG uses a different apostrophe.
The Witchs Love Diary: {}

View file

@ -567331,6 +567331,7 @@ The Witch's Love Diary:
id: 1868296162 id: 1868296162
installDir: installDir:
The Witch's Love Diary: {} The Witch's Love Diary: {}
The Witchs Love Diary: {}
launch: launch:
<base>/The Witch's Love Diary.exe: <base>/The Witch's Love Diary.exe:
- when: - when:

View file

@ -216,6 +216,15 @@ function integrateOverriddenData(game: Game, override: OverriddenGame) {
game.id.flatpak = override.id.flatpak; game.id.flatpak = override.id.flatpak;
} }
} }
if (override.installDir) {
if (game.installDir === undefined) {
game.installDir = {};
}
for (const key in override.installDir) {
game.installDir[key] = {};
}
}
} }
function hasAnyData(game: Game): boolean { function hasAnyData(game: Game): boolean {
@ -246,6 +255,12 @@ export class ManifestFile extends YamlFile<Manifest> {
const game: Game = {}; const game: Game = {};
integrateWikiData(game, info); integrateWikiData(game, info);
if (game.steam?.id !== undefined) {
const appInfo = await steamCache.getAppInfo(game.steam.id);
integrateSteamData(game, appInfo);
}
if (overridden) { if (overridden) {
integrateOverriddenData(game, overridden); integrateOverriddenData(game, overridden);
} }
@ -253,10 +268,7 @@ export class ManifestFile extends YamlFile<Manifest> {
if (!hasAnyData(game)) { if (!hasAnyData(game)) {
continue; continue;
} }
if (game.steam?.id !== undefined) {
const appInfo = await steamCache.getAppInfo(game.steam.id);
integrateSteamData(game, appInfo);
}
this.data[title] = game; this.data[title] = game;
} }