idk why it's not working
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user