diff --git a/Torch.API/Utils/ModItemUtils.cs b/Torch.API/Utils/ModItemUtils.cs index d868aa1..77aafa2 100644 --- a/Torch.API/Utils/ModItemUtils.cs +++ b/Torch.API/Utils/ModItemUtils.cs @@ -7,10 +7,10 @@ namespace Torch.Utils { public static MyObjectBuilder_Checkpoint.ModItem Create(ulong modId) { - var serviceName = "Steam"; - if (MyGameService.IsOnline) - serviceName = MyGameService.GetDefaultUGC().ServiceName; - return new MyObjectBuilder_Checkpoint.ModItem(modId, serviceName); + return new MyObjectBuilder_Checkpoint.ModItem(modId, GetDefaultServiceName()); } + + //because KEEEN! + public static string GetDefaultServiceName() => "Steam"; } } \ No newline at end of file diff --git a/Torch/VRageGame.cs b/Torch/VRageGame.cs index 62bb5f5..acf4572 100644 --- a/Torch/VRageGame.cs +++ b/Torch/VRageGame.cs @@ -148,6 +148,7 @@ namespace Torch //not implemented by keen.. removed in cross-play update //MyVRage.Platform.InitScripting(MyVRageScripting.Create()); + _ = MyVRage.Platform.Scripting; MyFileSystem.ExePath = Path.GetDirectoryName(typeof(SpaceEngineersGame).Assembly.Location); @@ -292,14 +293,24 @@ namespace Torch MyObjectBuilder_Checkpoint checkpoint = MyLocalCache.LoadCheckpoint(sessionPath, out ulong checkpointSize); if (MySession.IsCompatibleVersion(checkpoint)) { - if (MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods, null).Success) + var downloadResult = MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods.Select(b => { + b.PublishedServiceName = ModItemUtils.GetDefaultServiceName(); + return b; + }).ToList(), null); + if (downloadResult.Success) + { + MyLog.Default.WriteLineAndConsole("Mods Downloaded"); // MySpaceAnalytics.Instance.SetEntry(MyGameEntryEnum.Load); MySession.Load(sessionPath, checkpoint, checkpointSize); _hostServerForSession(MySession.Static, MyMultiplayer.Static); } else + { MyLog.Default.WriteLineAndConsole("Unable to download mods"); + MyLog.Default.WriteLineAndConsole("Missing Mods:"); + downloadResult.MismatchMods?.ForEach(b => MyLog.Default.WriteLineAndConsole($"\t{b.Title} ({b.Id})")); + } } else MyLog.Default.WriteLineAndConsole(MyTexts.Get(MyCommonTexts.DialogTextIncompatibleWorldVersion)