decord/source/modules/games/utils/getApplicationIdsForGame.tsx

44 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 11650
// Function ID: 11651
2026-09-03 10:05:34 +00:00
// Name: getApplicationIdsForGame
// Dependencies: [4864, 1916, 2]
2026-09-03 10:05:34 +00:00
// Exports: default
// Module 11650 (getApplicationIdsForGame)
import ApplicationStore from "ApplicationStore" /* 4864 */;
import GameStore from "GameStore" /* 1916 */;
2026-09-03 10:05:34 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/games/utils/getApplicationIdsForGame.tsx");
2026-09-03 10:05:34 +00:00
export default function getApplicationIdsForGame(gameId) {
2026-09-03 10:05:34 +00:00
const set = new Set();
if (null != gameId) {
set.add(gameId);
let game = GameStore.getGame(gameId);
2026-09-03 10:05:34 +00:00
if (game != null) {
let linkedApplications = game.linkedApplications;
if (linkedApplications != null) {
let item = linkedApplications.forEach((id) => set.add(id.id));
}
}
const application = set.getApplication(gameId);
2026-09-03 10:05:34 +00:00
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);
2026-09-03 10:05:34 +00:00
if (game != null) {
const linkedApplications = game.linkedApplications;
if (linkedApplications != null) {
const item = linkedApplications.forEach((id) => set.add(id.id));
}
}
});
}
}
}
return set;
};