mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-09 16:21:51 +00:00
Remove game version check
Doesn't make much sense with how experimental CE is right now. A different logic for checking whether a mod is compatible will be used later.
This commit is contained in:
parent
0ba90b7b43
commit
321f517593
6
package-lock.json
generated
6
package-lock.json
generated
@ -15,8 +15,7 @@
|
||||
"crc": "^3.8.0",
|
||||
"debounce-promise": "^3.1.2",
|
||||
"howler": "^2.1.2",
|
||||
"lz-string": "^1.4.4",
|
||||
"semver": "^7.3.5"
|
||||
"lz-string": "^1.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.24.0",
|
||||
@ -11878,6 +11877,7 @@
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
@ -15934,6 +15934,7 @@
|
||||
"version": "7.3.8",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
@ -18844,6 +18845,7 @@
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
|
||||
@ -27,8 +27,7 @@
|
||||
"crc": "^3.8.0",
|
||||
"debounce-promise": "^3.1.2",
|
||||
"howler": "^2.1.2",
|
||||
"lz-string": "^1.4.4",
|
||||
"semver": "^7.3.5"
|
||||
"lz-string": "^1.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.24.0",
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { GLOBAL_APP } from "@/core/globals";
|
||||
import { FsError } from "@/platform/fs_error";
|
||||
import { createLogger } from "../core/logging";
|
||||
import { Storage } from "../platform/storage";
|
||||
@ -5,10 +6,6 @@ import { Mod } from "./mod";
|
||||
import { ModInterface } from "./mod_interface";
|
||||
import { MOD_SIGNALS } from "./mod_signals";
|
||||
|
||||
import { GLOBAL_APP } from "@/core/globals";
|
||||
import semverSatisifies from "semver/functions/satisfies";
|
||||
import semverValidRange from "semver/ranges/valid";
|
||||
|
||||
const LOG = createLogger("mods");
|
||||
|
||||
/**
|
||||
@ -19,7 +16,6 @@ const LOG = createLogger("mods");
|
||||
* website: string;
|
||||
* description: string;
|
||||
* id: string;
|
||||
* minimumGameVersion?: string;
|
||||
* settings: [];
|
||||
* doesNotAffectSavegame?: boolean
|
||||
* }} ModMetadata
|
||||
@ -175,26 +171,6 @@ export class ModLoader {
|
||||
const { modClass, meta } = this.modLoadQueue[i];
|
||||
const modDataFile = "modsettings_" + meta.id + "__" + meta.version + ".json";
|
||||
|
||||
if (meta.minimumGameVersion) {
|
||||
const minimumGameVersion = meta.minimumGameVersion;
|
||||
if (!semverValidRange(minimumGameVersion)) {
|
||||
alert("Mod " + meta.id + " has invalid minimumGameVersion: " + minimumGameVersion);
|
||||
continue;
|
||||
}
|
||||
if (!semverSatisifies(G_BUILD_VERSION, minimumGameVersion)) {
|
||||
alert(
|
||||
"Mod '" +
|
||||
meta.id +
|
||||
"' is incompatible with this version of the game: \n\n" +
|
||||
"Mod requires version " +
|
||||
minimumGameVersion +
|
||||
" but this game has version " +
|
||||
G_BUILD_VERSION
|
||||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
let settings = meta.settings;
|
||||
|
||||
if (meta.settings) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user