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:
parent
ed83770348
commit
0e86cd3535
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user