Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
81 lines
2.6 KiB
TypeScript
81 lines
2.6 KiB
TypeScript
// Module ID: 11662
|
|
// Function ID: 11663
|
|
// Name: getApplicationIdsForGame
|
|
// Dependencies: [4866, 1917, 504, 2]
|
|
// Exports: default, useApplicationIdsForGame
|
|
|
|
// Module 11662 (getApplicationIdsForGame)
|
|
import ApplicationStore from "ApplicationStore" /* 4866 */;
|
|
import GameStore from "GameStore" /* 1917 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
const require = fn;
|
|
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);
|
|
const game = GameStore.getGame(gameId);
|
|
if (game != null) {
|
|
const linkedApplications = game.linkedApplications;
|
|
if (linkedApplications != null) {
|
|
const item = linkedApplications.forEach((id) => set.add(id.id));
|
|
}
|
|
}
|
|
const application = ApplicationStore.getApplication(gameId);
|
|
if (application != null) {
|
|
const linkedGames = application.linkedGames;
|
|
if (linkedGames != null) {
|
|
const item1 = linkedGames.forEach((id) => {
|
|
set.add(id.id);
|
|
game = game.getGame(id.id);
|
|
if (game != null) {
|
|
const linkedApplications = game.linkedApplications;
|
|
if (linkedApplications != null) {
|
|
const item = linkedApplications.forEach((id) => set.add(id.id));
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
return set;
|
|
};
|
|
export const useApplicationIdsForGame = function useApplicationIdsForGame(gameId) {
|
|
_require = gameId;
|
|
const items = [GameStore, ApplicationStore];
|
|
const items1 = [gameId];
|
|
return require("initialize").useStateFromStoresArray(items, () => {
|
|
const set = new Set();
|
|
if (null != closure_0) {
|
|
set.add(tmp);
|
|
game = GameStore.getGame(tmp);
|
|
if (game != null) {
|
|
let linkedApplications = game.linkedApplications;
|
|
if (linkedApplications != null) {
|
|
let item = linkedApplications.forEach((id) => set.add(id.id));
|
|
}
|
|
}
|
|
const application = ApplicationStore.getApplication(tmp);
|
|
if (application != null) {
|
|
const linkedGames = application.linkedGames;
|
|
if (linkedGames != null) {
|
|
const item1 = linkedGames.forEach((id) => {
|
|
set.add(id.id);
|
|
game = game.getGame(id.id);
|
|
if (game != null) {
|
|
const linkedApplications = game.linkedApplications;
|
|
if (linkedApplications != null) {
|
|
const item = linkedApplications.forEach((id) => set.add(id.id));
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
return Array.from(set);
|
|
}, items1);
|
|
};
|