Add extra Steam/GOG IDs to manifest

This commit is contained in:
mtkennerly 2023-06-23 12:25:40 +08:00
parent fb7a3d26f3
commit 1e31ede551
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
4 changed files with 32 additions and 0 deletions

View file

@ -104038,6 +104038,9 @@ Command & Conquer:
- config
when:
- os: windows
id:
steamExtra:
- 24810
installDir:
Command and Conquer 3 Tiberium Wars: {}
launch:

View file

@ -110,3 +110,11 @@ additionalProperties:
properties:
flatpak:
type: string
gogExtra:
type: array
items:
type: integer
steamExtra:
type: array
items:
type: integer

View file

@ -91,3 +91,11 @@ additionalProperties:
properties:
flatpak:
type: string
gogExtra:
type: array
items:
type: integer
steamExtra:
type: array
items:
type: integer

View file

@ -45,6 +45,8 @@ export interface Game {
};
id?: {
flatpak?: string,
gogExtra?: Array<number>,
steamExtra?: Array<number>,
};
}
@ -82,15 +84,26 @@ function doLaunchPathsMatch(fromSteam: string | undefined, fromManifest: string
}
function integrateWikiData(game: Game, cache: WikiGameCache[""]): void {
game.id = {};
if (cache.steam !== undefined) {
game.steam = { id: cache.steam };
}
if (cache.steamSide !== undefined) {
game.id.steamExtra = cache.steamSide;
}
if (cache.gog !== undefined) {
game.gog = { id: cache.gog };
}
if (cache.gogSide !== undefined) {
game.id.gogExtra = cache.gogSide;
}
const info = parseTemplates(cache.templates ?? []);
game.files = info.files;
game.registry = info.registry;
if (game.id.flatpak === undefined && game.id.gogExtra === undefined && game.id.steamExtra === undefined) {
delete game.id;
}
}
function integrateSteamData(game: Game, appInfo: SteamGameCache[""] | undefined): void {