Handle references into inactive modules

This commit is contained in:
2026-04-21 14:00:37 +00:00
parent 6d8f7a0559
commit 7d574f7c1b
12 changed files with 125 additions and 11 deletions

View File

@@ -122,7 +122,8 @@ export async function runRuntimeAnalysis({ onProgress }={}) {
listFiles: () => listFoundryFiles(onProgress),
listSources: () => listFoundrySources(onProgress),
onProgress,
i18n: { format }
i18n: { format },
packageActivity: collectPackageActivity()
});
}
@@ -221,3 +222,13 @@ function findEmbeddedIndex(path, segment) {
const candidate = path[index + 1];
return Number.isInteger(candidate) ? candidate : null;
}
function collectPackageActivity() {
const modules = new Map();
const moduleLabels = new Map();
for (const module of game.modules.values()) {
modules.set(module.id, !!module.active);
moduleLabels.set(module.id, module.title ?? module.id);
}
return { modules, moduleLabels };
}