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)
|
public static MyObjectBuilder_Checkpoint.ModItem Create(ulong modId)
|
||||||
{
|
{
|
||||||
var serviceName = "Steam";
|
return new MyObjectBuilder_Checkpoint.ModItem(modId, GetDefaultServiceName());
|
||||||
if (MyGameService.IsOnline)
|
}
|
||||||
serviceName = MyGameService.GetDefaultUGC().ServiceName;
|
|
||||||
return new MyObjectBuilder_Checkpoint.ModItem(modId, serviceName);
|
//because KEEEN!
|
||||||
}
|
public static string GetDefaultServiceName() => "Steam";
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -148,6 +148,7 @@ namespace Torch
|
|||||||
|
|
||||||
//not implemented by keen.. removed in cross-play update
|
//not implemented by keen.. removed in cross-play update
|
||||||
//MyVRage.Platform.InitScripting(MyVRageScripting.Create());
|
//MyVRage.Platform.InitScripting(MyVRageScripting.Create());
|
||||||
|
_ = MyVRage.Platform.Scripting;
|
||||||
|
|
||||||
MyFileSystem.ExePath = Path.GetDirectoryName(typeof(SpaceEngineersGame).Assembly.Location);
|
MyFileSystem.ExePath = Path.GetDirectoryName(typeof(SpaceEngineersGame).Assembly.Location);
|
||||||
|
|
||||||
@@ -292,14 +293,24 @@ namespace Torch
|
|||||||
MyObjectBuilder_Checkpoint checkpoint = MyLocalCache.LoadCheckpoint(sessionPath, out ulong checkpointSize);
|
MyObjectBuilder_Checkpoint checkpoint = MyLocalCache.LoadCheckpoint(sessionPath, out ulong checkpointSize);
|
||||||
if (MySession.IsCompatibleVersion(checkpoint))
|
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);
|
// MySpaceAnalytics.Instance.SetEntry(MyGameEntryEnum.Load);
|
||||||
MySession.Load(sessionPath, checkpoint, checkpointSize);
|
MySession.Load(sessionPath, checkpoint, checkpointSize);
|
||||||
_hostServerForSession(MySession.Static, MyMultiplayer.Static);
|
_hostServerForSession(MySession.Static, MyMultiplayer.Static);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
MyLog.Default.WriteLineAndConsole("Unable to download mods");
|
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
|
else
|
||||||
MyLog.Default.WriteLineAndConsole(MyTexts.Get(MyCommonTexts.DialogTextIncompatibleWorldVersion)
|
MyLog.Default.WriteLineAndConsole(MyTexts.Get(MyCommonTexts.DialogTextIncompatibleWorldVersion)
|
||||||
|
Reference in New Issue
Block a user