Include Steam IDs in wiki cache

This commit is contained in:
mtkennerly 2022-07-01 01:20:38 +08:00
parent 472f47eec7
commit 59520891a8
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
2 changed files with 42973 additions and 1 deletions

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,7 @@ export type WikiGameCache = {
renamedFrom?: Array<string>,
irregularPath?: boolean,
templates?: Array<string>,
steam?: number,
};
};
@ -635,6 +636,7 @@ export async function getGame(pageTitle: string, cache: WikiGameCache, client: W
const steamId = Number(template.parameters["steam appid"]);
if (!isNaN(steamId) && steamId > 0) {
game.steam = { id: steamId };
cache[pageTitle].steam = steamId;
}
} else if (template.name === "Game data/saves" || template.name === "Game data/config") {
const reparsed = parseWiki(template.toString());