1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Loading fixes

This commit is contained in:
Exund 2020-09-10 01:45:55 +02:00
parent dcda551233
commit 6a28fa3b66
2 changed files with 18 additions and 16 deletions

View File

@ -231,20 +231,20 @@ export async function initMods() {
T.buildings[base_id][variant] = translations.variants[variant];
}
}
if(mod.shapes) {
mod_infos += `${mod.shapes.length} shapes, `;
for (const shape of mod.shapes) {
ModShapes.push(shape);
allShapeData[shape.id] = shape;
}
}
if(mod.shapes) {
mod_infos += `${mod.shapes.length} shapes, `;
for (const shape of mod.shapes) {
ModShapes.push(shape);
allShapeData[shape.id] = shape;
}
}
}
logger.log(mod_infos);
}
initShapes();
logger.log(`${Mods.length} mods loaded`);
}

View File

@ -47,13 +47,6 @@ console.log("%cDEVCODE BUILT IN", "color: #f77");
logSection("Boot Process", "#f9a825");
initMods();
initDrawUtils();
initComponentRegistry();
initItemRegistry();
initMetaBuildingRegistry();
initGameSpeedRegistry();
let app = null;
function bootApp() {
@ -62,4 +55,13 @@ function bootApp() {
app.boot();
}
(async () => {
await initMods();
initDrawUtils();
initComponentRegistry();
initItemRegistry();
initMetaBuildingRegistry();
initGameSpeedRegistry();
})();
window.addEventListener("load", bootApp);