diff --git a/Torch.Server/Managers/InstanceManager.cs b/Torch.Server/Managers/InstanceManager.cs index f1b4328..6d71931 100644 --- a/Torch.Server/Managers/InstanceManager.cs +++ b/Torch.Server/Managers/InstanceManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; @@ -222,6 +222,7 @@ namespace Torch.Server.Managers savedMod.IsDependency = mod.IsDependency; savedMod.Name = mod.Name; savedMod.FriendlyName = mod.FriendlyName; + world.WorldConfiguration.Mods.Add(savedMod); } Task.Run(() => DedicatedConfig.UpdateAllModInfosAsync()); diff --git a/Torch/Commands/TorchCommands.cs b/Torch/Commands/TorchCommands.cs index 4b4de2b..0497f80 100644 --- a/Torch/Commands/TorchCommands.cs +++ b/Torch/Commands/TorchCommands.cs @@ -232,7 +232,7 @@ namespace Torch.Commands [Command("stop cancel", "Cancel a pending stop.")] public void CancelStop() { - if (_restartPending) + if (_stopPending) _cancelStop = true; else Context.Respond("Server Stop is not pending."); diff --git a/Torch/Patches/ModsDownloadingPatch.cs b/Torch/Patches/ModsDownloadingPatch.cs index a27211a..d871013 100644 --- a/Torch/Patches/ModsDownloadingPatch.cs +++ b/Torch/Patches/ModsDownloadingPatch.cs @@ -25,17 +25,15 @@ namespace Torch.Patches public static void Patch(PatchContext ctx) { _log.Info("Patching mods downloading"); + ctx.GetPattern(_downloadWorldModsBlockingMethod).Suffixes .Add(typeof(ModsDownloadingPatch).GetMethod(nameof(Postfix))); - var pattern = ctx.GetPattern(_downloadWorldModsBlockingMethod); } - - public static void Postfix(MyWorkshop.ResultData __result) { if (__result.Success) return; _log.Warn("Missing Mods:"); - __result.MismatchMods.ForEach(b => _log.Info($"\t{b.Title} : {b.Id}")); + __result.MismatchMods?.ForEach(b => _log.Info($"\t{b}")); } } } \ No newline at end of file diff --git a/Torch/VRageGame.cs b/Torch/VRageGame.cs index 8f7f2e3..b6d99c7 100644 --- a/Torch/VRageGame.cs +++ b/Torch/VRageGame.cs @@ -176,7 +176,7 @@ namespace Torch serviceInstance = MyModIoService.Create(service, "spaceengineers", "264", "1fb4489996a5e8ffc6ec1135f9985b5b", "331", "f2b64abe55452252b030c48adc0c1f0e", - MyPlatformGameSettings.UGC_TEST_ENVIRONMENT); + MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, true); MyEOSService.InitNetworking(dedicated, dedicated ? MyPerServerSettings.GameDSName : MyPerServerSettings.GameNameSafe, service,