mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-11 09:11:50 +00:00
Remove externalModUrl
Remove the debug option and code that used it. It is redundant due to existence of --load-mod in the Electron wrapper.
This commit is contained in:
parent
499dbd269a
commit
0ba90b7b43
@ -113,9 +113,6 @@ export default {
|
|||||||
// Disables slow asserts, useful for debugging performance
|
// Disables slow asserts, useful for debugging performance
|
||||||
// disableSlowAsserts: true,
|
// disableSlowAsserts: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
// Allows to load a mod from an external source for developing it
|
|
||||||
// externalModUrl: "http://localhost:3005/combined.js",
|
|
||||||
// -----------------------------------------------------------------------------------
|
|
||||||
// Visualizes the shape grouping on belts
|
// Visualizes the shape grouping on belts
|
||||||
// showShapeGrouping: true
|
// showShapeGrouping: true
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { FsError } from "@/platform/fs_error";
|
import { FsError } from "@/platform/fs_error";
|
||||||
import { globalConfig } from "../core/config";
|
|
||||||
import { createLogger } from "../core/logging";
|
import { createLogger } from "../core/logging";
|
||||||
import { Storage } from "../platform/storage";
|
import { Storage } from "../platform/storage";
|
||||||
import { Mod } from "./mod";
|
import { Mod } from "./mod";
|
||||||
@ -138,24 +137,6 @@ export class ModLoader {
|
|||||||
let mods = await ipcRenderer.invoke("get-mods");
|
let mods = await ipcRenderer.invoke("get-mods");
|
||||||
mods = mods.map(mod => mod.source);
|
mods = mods.map(mod => mod.source);
|
||||||
|
|
||||||
if (G_IS_DEV && globalConfig.debug.externalModUrl) {
|
|
||||||
const modURLs = Array.isArray(globalConfig.debug.externalModUrl)
|
|
||||||
? globalConfig.debug.externalModUrl
|
|
||||||
: [globalConfig.debug.externalModUrl];
|
|
||||||
|
|
||||||
for (let i = 0; i < modURLs.length; i++) {
|
|
||||||
const response = await fetch(modURLs[i], {
|
|
||||||
method: "GET",
|
|
||||||
});
|
|
||||||
if (response.status !== 200) {
|
|
||||||
throw new Error(
|
|
||||||
"Failed to load " + modURLs[i] + ": " + response.status + " " + response.statusText
|
|
||||||
);
|
|
||||||
}
|
|
||||||
mods.push(await response.text());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.$shapez_registerMod = (modClass, meta) => {
|
window.$shapez_registerMod = (modClass, meta) => {
|
||||||
if (this.initialized) {
|
if (this.initialized) {
|
||||||
throw new Error("Can't register mod after modloader is initialized");
|
throw new Error("Can't register mod after modloader is initialized");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user