1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-14 02:31:51 +00:00

Fix modloading in standalone

This commit is contained in:
tobspr 2022-01-14 10:14:51 +01:00
parent ed83770348
commit 0e86cd3535

View File

@ -40,11 +40,12 @@ export class ModLoader {
const mods = await getIPCRenderer().invoke("get-mods"); const mods = await getIPCRenderer().invoke("get-mods");
mods.forEach(modCode => { mods.forEach(modCode => {
const registerMod = mod => { window.registerMod = mod => {
this.modLoadQueue.push(mod); this.modLoadQueue.push(mod);
}; };
// ugh // ugh
eval(modCode); eval(modCode);
delete window.registerMod;
}); });
} catch (ex) { } catch (ex) {
alert("Failed to load mods: " + ex); alert("Failed to load mods: " + ex);