Rename to SourceVersion

This commit is contained in:
Cooldude2606 committed 2026-07-02 00:27:05 +01:00
1 parent 2e27c4f499
commit 573274875c
12 files changed
+70 -67

No files matched your search

+1 -1
View File
@@ -80,7 +80,7 @@ export default class BaseConnection extends lib.Link {
return modPack;
}
getMod(mod: { name: string, version: lib.GameVersion, sha1?: string }) {
getMod(mod: { name: string, version: lib.SourceVersion, sha1?: string }) {
let filename = lib.ModInfo.filename(mod.name, mod.version);
let modInfo = this._controller.modStore.files.get(filename);
if (!modInfo) {
+1 -1
View File
@@ -707,7 +707,7 @@ export default class ControlConnection extends BaseConnection {
const release = releases.releases
.filter(info => versionRange.testVersion(info.version))
.reduce<ModPortalReleaseType | undefined>((max, cur) => (
max && lib.integerGameVersion(max.version) > lib.integerGameVersion(cur.version) ? max : cur
max && lib.integerSourceVersion(max.version) > lib.integerSourceVersion(cur.version) ? max : cur
), undefined);
if (!release) {
+1 -1
View File
@@ -766,7 +766,7 @@ export default class Controller {
// migrate: 2.0.0-alpha.22 - old buildins used X.Y rather than X.Y.Z
// All other versions are kept verbatim so they still match the mod's file name.
if (lib.isPartialVersion(mod.version)) {
mod.version = lib.normaliseFullVersion(mod.version) as lib.GameVersion;
mod.version = lib.normaliseFullVersion(mod.version) as lib.SourceVersion;
}
}
return json;