Added Builtin Mods

This commit is contained in:
Cooldude2606 committed 2024-11-13 17:32:14 +00:00
1 parent c6354ded70
commit c714d86c5c
4 files changed
+44 -8

No files matched your search

+4 -1
View File
@@ -618,11 +618,14 @@ export default class Host extends lib.Link {
}
async fetchMods(mods: Iterable<lib.ModRecord>) {
// This is better than the previous hard coded names
// But it really shouldn't be a hard coded version either
const builtinModNames = lib.ModPack.getBuiltinMods("2.0").map(builtinMod => builtinMod.name);
const modInfos: Promise<lib.ModInfo>[] = [];
for (const mod of mods) {
// XXX These mods ship with Factorio, but the list of mods may
// change and should not be hardcoded here.
if (["core", "base"].includes(mod.name)) {
if (builtinModNames.includes(mod.name)) {
continue;
}
modInfos.push(this.fetchMod(mod));