1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-09 16:21:51 +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:
Даниїл Григор'єв 2025-04-08 03:46:32 +03:00
parent 499dbd269a
commit 0ba90b7b43
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D
2 changed files with 0 additions and 22 deletions

View File

@ -113,9 +113,6 @@ export default {
// Disables slow asserts, useful for debugging performance
// 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
// showShapeGrouping: true
// -----------------------------------------------------------------------------------

View File

@ -1,5 +1,4 @@
import { FsError } from "@/platform/fs_error";
import { globalConfig } from "../core/config";
import { createLogger } from "../core/logging";
import { Storage } from "../platform/storage";
import { Mod } from "./mod";
@ -138,24 +137,6 @@ export class ModLoader {
let mods = await ipcRenderer.invoke("get-mods");
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) => {
if (this.initialized) {
throw new Error("Can't register mod after modloader is initialized");