decord/source/modules/games/utils/getApplicationIdsForGame.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

43 lines
1.3 KiB
TypeScript

// Module ID: 11588
// Function ID: 11589
// Name: getApplicationIdsForGame
// Dependencies: [4833, 1916, 2]
// Exports: default
// Module 11588 (getApplicationIdsForGame)
import ApplicationStore from "ApplicationStore" /* 4833 */;
import GameStore from "GameStore" /* 1916 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/games/utils/getApplicationIdsForGame.tsx");
export default function getApplicationIdsForGame(gameId) {
const set = new Set();
if (null != gameId) {
set.add(gameId);
let game = GameStore.getGame(gameId);
if (game != null) {
let linkedApplications = game.linkedApplications;
if (linkedApplications != null) {
let item = linkedApplications.forEach((id) => set.add(id.id));
}
}
const application = set.getApplication(gameId);
if (application != null) {
const linkedGames = application.linkedGames;
if (linkedGames != null) {
const item1 = linkedGames.forEach((id) => {
set.add(id.id);
const game = GameStore.getGame(id.id);
if (game != null) {
const linkedApplications = game.linkedApplications;
if (linkedApplications != null) {
const item = linkedApplications.forEach((id) => set.add(id.id));
}
}
});
}
}
}
return set;
};