From dfcdc6edc6b4711cb938b759891674f4b129a686 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 26 May 2026 13:44:32 -0400 Subject: [PATCH 1/2] OpenDream Compatibility --- SS14.Launcher/ConfigConstants.cs | 7 ++++++ .../EngineManager/EngineManagerDynamic.cs | 7 ++++-- SS14.Launcher/Models/Updater.cs | 24 +++++++++++-------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/SS14.Launcher/ConfigConstants.cs b/SS14.Launcher/ConfigConstants.cs index 8772a0a6..9d7e1500 100644 --- a/SS14.Launcher/ConfigConstants.cs +++ b/SS14.Launcher/ConfigConstants.cs @@ -106,6 +106,13 @@ public static class ConfigConstants "https://robust-builds.fallback.cdn.spacestation14.com/modules.json", ]) }, + { + "Supermatter", + new UrlFallbackSet([ + "https://robust-builds.cdn.spacestation14.com/modules.json", + "https://robust-builds.fallback.cdn.spacestation14.com/modules.json", + ]) + }, }; private static readonly UrlFallbackSet LauncherDataBaseUrl = new([ diff --git a/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs b/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs index bc9d64d7..eb978b4d 100644 --- a/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs +++ b/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs @@ -326,8 +326,11 @@ private static unsafe bool VerifyModuleSignature(FileStream stream, string modul public async Task GetEngineModuleManifest(string engine, CancellationToken cancel = default) { - if (!ConfigConstants.EngineBuildsUrl.TryGetValue(engine, out var urls)) - throw new InvalidOperationException("No manifest URL for engine module"); + if (!ConfigConstants.EngineModulesUrl.TryGetValue(engine, out var urls)) + { + if (!ConfigConstants.EngineModulesUrl.TryGetValue("Robust", out urls)) + throw new InvalidOperationException("No manifest URL for engine module"); + } if (await urls.GetFromJsonAsync(_http, cancel) is { } manifest) return manifest; diff --git a/SS14.Launcher/Models/Updater.cs b/SS14.Launcher/Models/Updater.cs index 056d7a29..dc1a0c39 100644 --- a/SS14.Launcher/Models/Updater.cs +++ b/SS14.Launcher/Models/Updater.cs @@ -132,7 +132,7 @@ private async Task RunUpdate( await Task.Run(() => { CullOldContentVersions(con); }, CancellationToken.None); - return await InstallEnginesForVersion(con, versionRowId, buildInfo.EngineType, cancel); + return await InstallEnginesForVersion(con, versionRowId, buildInfo.EngineType, moduleManifest, cancel); } private async Task InstallContentBundle( @@ -254,32 +254,36 @@ FROM ContentManifest return versionId; }, CancellationToken.None); - return await InstallEnginesForVersion(con, versionId, metadata.Engine, cancel); + return await InstallEnginesForVersion(con, versionId, metadata.Engine, moduleManifest, cancel); } private async Task InstallEnginesForVersion( SqliteConnection con, long versionRowId, string engine, + Lazy> moduleManifest, CancellationToken cancel) { Status = UpdateStatus.CheckingClientUpdate; var modules = con.Query<(string, string)>( - "SELECT ModuleName, moduleVersion FROM ContentEngineDependency WHERE ModuleName = @Engine AND VersionId = @Version", - new { Engine = engine, Version = versionRowId }).ToArray(); + "SELECT ModuleName, moduleVersion FROM ContentEngineDependency WHERE VersionId = @Version", + new { Version = versionRowId }).ToArray(); for (var index = 0; index < modules.Length; index++) { var (name, version) = modules[index]; - if (!ConfigConstants.EngineBuildsUrl.TryGetValue(name, out _)) + if (name == engine) { - Log.Error($"No engine URL set for module {name}"); - continue; + var newEngineVersion = await InstallEngineVersionIfMissing(version, name, cancel); + modules[index] = (name, newEngineVersion); + } + else + { + Status = UpdateStatus.DownloadingEngineModules; + var manifest = await moduleManifest.Value; + await _engineManager.DownloadModuleIfNecessary(name, version, manifest, progress: null, cancel); } - - var newEngineVersion = await InstallEngineVersionIfMissing(version, name, cancel); - modules[index] = (name, newEngineVersion); } Status = UpdateStatus.CullingEngine; From 86b56b235b4c0d93605a2a80f3e5a36c0fb0c58d Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 26 May 2026 13:54:42 -0400 Subject: [PATCH 2/2] Update EngineManagerDynamic.cs --- SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs b/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs index eb978b4d..bc9d64d7 100644 --- a/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs +++ b/SS14.Launcher/Models/EngineManager/EngineManagerDynamic.cs @@ -326,11 +326,8 @@ private static unsafe bool VerifyModuleSignature(FileStream stream, string modul public async Task GetEngineModuleManifest(string engine, CancellationToken cancel = default) { - if (!ConfigConstants.EngineModulesUrl.TryGetValue(engine, out var urls)) - { - if (!ConfigConstants.EngineModulesUrl.TryGetValue("Robust", out urls)) - throw new InvalidOperationException("No manifest URL for engine module"); - } + if (!ConfigConstants.EngineBuildsUrl.TryGetValue(engine, out var urls)) + throw new InvalidOperationException("No manifest URL for engine module"); if (await urls.GetFromJsonAsync(_http, cancel) is { } manifest) return manifest;