This commit is contained in:
N1Ran
2021-03-18 06:29:00 -04:00
4 changed files with 6 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel; using System.ComponentModel;
@@ -222,6 +222,7 @@ namespace Torch.Server.Managers
savedMod.IsDependency = mod.IsDependency; savedMod.IsDependency = mod.IsDependency;
savedMod.Name = mod.Name; savedMod.Name = mod.Name;
savedMod.FriendlyName = mod.FriendlyName; savedMod.FriendlyName = mod.FriendlyName;
world.WorldConfiguration.Mods.Add(savedMod); world.WorldConfiguration.Mods.Add(savedMod);
} }
Task.Run(() => DedicatedConfig.UpdateAllModInfosAsync()); Task.Run(() => DedicatedConfig.UpdateAllModInfosAsync());

View File

@@ -232,7 +232,7 @@ namespace Torch.Commands
[Command("stop cancel", "Cancel a pending stop.")] [Command("stop cancel", "Cancel a pending stop.")]
public void CancelStop() public void CancelStop()
{ {
if (_restartPending) if (_stopPending)
_cancelStop = true; _cancelStop = true;
else else
Context.Respond("Server Stop is not pending."); Context.Respond("Server Stop is not pending.");

View File

@@ -25,17 +25,15 @@ namespace Torch.Patches
public static void Patch(PatchContext ctx) public static void Patch(PatchContext ctx)
{ {
_log.Info("Patching mods downloading"); _log.Info("Patching mods downloading");
ctx.GetPattern(_downloadWorldModsBlockingMethod).Suffixes ctx.GetPattern(_downloadWorldModsBlockingMethod).Suffixes
.Add(typeof(ModsDownloadingPatch).GetMethod(nameof(Postfix))); .Add(typeof(ModsDownloadingPatch).GetMethod(nameof(Postfix)));
var pattern = ctx.GetPattern(_downloadWorldModsBlockingMethod);
} }
public static void Postfix(MyWorkshop.ResultData __result) public static void Postfix(MyWorkshop.ResultData __result)
{ {
if (__result.Success) return; if (__result.Success) return;
_log.Warn("Missing Mods:"); _log.Warn("Missing Mods:");
__result.MismatchMods.ForEach(b => _log.Info($"\t{b.Title} : {b.Id}")); __result.MismatchMods?.ForEach(b => _log.Info($"\t{b}"));
} }
} }
} }

View File

@@ -176,7 +176,7 @@ namespace Torch
serviceInstance = MyModIoService.Create(service, "spaceengineers", "264", serviceInstance = MyModIoService.Create(service, "spaceengineers", "264",
"1fb4489996a5e8ffc6ec1135f9985b5b", "331", "f2b64abe55452252b030c48adc0c1f0e", "1fb4489996a5e8ffc6ec1135f9985b5b", "331", "f2b64abe55452252b030c48adc0c1f0e",
MyPlatformGameSettings.UGC_TEST_ENVIRONMENT); MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, true);
MyEOSService.InitNetworking(dedicated, MyEOSService.InitNetworking(dedicated,
dedicated ? MyPerServerSettings.GameDSName : MyPerServerSettings.GameNameSafe, service, dedicated ? MyPerServerSettings.GameDSName : MyPerServerSettings.GameNameSafe, service,