Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
43 lines
1.3 KiB
TypeScript
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;
|
|
};
|