mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-13 18:21:51 +00:00
Add support for loading mods from external sources in DEV
This commit is contained in:
parent
99e49d5abb
commit
27e4dc9ba5
@ -116,8 +116,8 @@ export default {
|
||||
// Disables slow asserts, useful for debugging performance
|
||||
// disableSlowAsserts: true,
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Loads the dev_mod.js for developing new mods
|
||||
// loadDevMod: true,
|
||||
// Allows to load a mod from an external source for developing it
|
||||
// externalModUrl: "http://localhost:3005/mods/demo_mod.nobuild/index.js",
|
||||
// -----------------------------------------------------------------------------------
|
||||
/* dev:end */
|
||||
};
|
||||
|
||||
@ -40,9 +40,9 @@ export class ModLoader {
|
||||
let mods = [];
|
||||
if (G_IS_STANDALONE) {
|
||||
mods = await getIPCRenderer().invoke("get-mods");
|
||||
} else if (G_IS_DEV && globalConfig.debug.loadDevMod) {
|
||||
} else if (G_IS_DEV && globalConfig.debug.externalModUrl) {
|
||||
const mod = await (
|
||||
await fetch("http://localhost:3005/mods/demo_mod.nobuild/index.js", {
|
||||
await fetch(globalConfig.debug.externalModUrl, {
|
||||
method: "GET",
|
||||
})
|
||||
).text();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user