Compare commits

...

22 Commits

Author SHA1 Message Date
zznty
83dfc7152f properly handle sigterm and dont freeze forever on unload 2023-07-13 13:18:20 +07:00
d7e5f53e4f Fix SteamCMD args order + add quit arg 2023-07-10 01:46:28 -04:00
9b08b39a1f Switch from depot tool to SteamCMD 2023-07-10 01:25:31 -04:00
zznty
8011f9eed7 update harmony 2023-07-09 03:46:23 +07:00
1df791e7a8 Update for latest version, and have script compiler use Release x64 compilation 2023-07-07 22:37:52 -04:00
zznty
bbc2f9046f update packages 2023-07-06 03:00:08 +07:00
117ea7df91 Use config stuff for mod service to avoid calling MyGameService static constructor 2023-07-03 22:45:08 -04:00
6ec355f931 Call new action if action is being added to initialized event when already initialized 2023-07-02 13:37:51 -04:00
zznty
343420f1d8 fix initialization issues 2023-07-01 19:57:18 +07:00
zznty
1396c8b1da upgrade packages 2023-06-29 14:35:37 +07:00
zznty
9900f92133 init server before starting ui due to static ctors 2023-06-29 14:20:23 +07:00
zznty
3be524d169 expose custom config to plugins
add support for some basic game parameters to be set via custom config
2023-06-29 14:08:45 +07:00
ed694ae95b Move SetupBasicGameInfo to initializer so it can be called before ui thread init 2023-06-27 15:51:12 -04:00
e9a9e180a8 Move Init back to where it was to prevent UI init issues 2023-06-27 15:02:13 -04:00
a8dfaf6239 Fix MyEntities init 2023-06-27 13:04:52 -04:00
bbdd1c7e01 Update package dependency version 2023-06-21 22:41:31 -04:00
e70e1ca4e6 Fix NRE in MyGameService static constructor 2023-06-18 01:06:22 -04:00
zznty
d65c20a05d update se to 1.202.120 2023-06-13 22:42:35 +07:00
f21976cf2d Depot tool is still broken 2023-06-12 22:50:44 -04:00
0c918106bc Update package dependency 2023-05-29 12:46:40 -04:00
6c9ec57d87 Update for latest SE version 2023-05-29 12:32:49 -04:00
zznty
b0f491ac88 do not exit without autostart 2023-04-25 16:32:52 +07:00
23 changed files with 629 additions and 429 deletions

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Torch.API.Managers;
using Torch.API.Session;
using VRage.Game.ModAPI;
@@ -26,6 +27,11 @@ namespace Torch.API
/// </summary>
ITorchConfig Config { get; }
/// <summary>
/// Extended Configuration for the current instance.
/// </summary>
IConfiguration Configuration { get; }
/// <inheritdoc cref="IPluginManager"/>
[Obsolete]
IPluginManager Plugins { get; }

View File

@@ -14,6 +14,9 @@ namespace Torch.API.Managers
/// <summary>
/// Fired when plugins are loaded.
/// </summary>
/// <remarks>
/// Fired when plugins are loaded and immediately if subscribed after the plugins are loaded.
/// </remarks>
event Action<IReadOnlyCollection<ITorchPlugin>> PluginsLoaded;
/// <summary>

View File

@@ -17,11 +17,12 @@
<ItemGroup>
<PackageReference Include="JorgeSerrano.Json.JsonSnakeCaseNamingPolicy" Version="0.9.0" />
<PackageReference Include="NLog" Version="5.1.0" />
<PackageReference Include="NuGet.Commands" Version="6.4.0" />
<PackageReference Include="NuGet.DependencyResolver.Core" Version="6.4.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="NuGet.Commands" Version="6.6.1" />
<PackageReference Include="NuGet.DependencyResolver.Core" Version="6.6.1" />
<PackageReference Include="SemanticVersioning" Version="2.0.2" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.66">
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.124">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>

View File

@@ -8,31 +8,42 @@
"resolved": "0.9.0",
"contentHash": "xCqODS+wzpUXNtg4bMMvXG5PLbP0iTwRzRn2R+zWHKm83E6tbV2bCagawXp1EnZeNpd5OXpMxehulZWns8efzQ=="
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Direct",
"requested": "[7.0.4, )",
"resolved": "7.0.4",
"contentHash": "8+XPvJnHZsYgHOQlcMuQe7QNF5KdVKHH1F/wW3nd8/u81Gk/XFAYMDP0Lpz18h7/AM95M662vvqMorcYxCBB4w==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"NLog": {
"type": "Direct",
"requested": "[5.1.0, )",
"resolved": "5.1.0",
"contentHash": "oW7ekrkRG9okpDMUcEglunWj8Qf2RY8qkgl+/chJoavzg3dbT13y32t19R54FKkmq80fKzw4ZekZkCrRGanKgQ=="
"requested": "[5.2.2, )",
"resolved": "5.2.2",
"contentHash": "r6Q9740g29gTwmTWlsgdIFm0mhNsfNZmbvWKX/Fxmi8X89ZrpUowHM2T2X1lP7RVpND+ef+XnfKL5g6Q1iNGXA=="
},
"NuGet.Commands": {
"type": "Direct",
"requested": "[6.4.0, )",
"resolved": "6.4.0",
"contentHash": "j3ma45boGZADsHpJcu3Y2yq+n2luicC6ezd61TXTTzbOzA452oAPaSsFGUB1stIsuP/DVoqkTzjHXjaCHuJKPQ==",
"requested": "[6.6.1, )",
"resolved": "6.6.1",
"contentHash": "D1b7gTk1wp7sxscLhS8O/yoErsRVbR4zJvLVD4jo1sgxh42ZOWKpMkhznPUxpvmCxBhw9hAy8/yWrRH91SfdEQ==",
"dependencies": {
"NuGet.Credentials": "6.4.0",
"NuGet.ProjectModel": "6.4.0"
"Microsoft.Extensions.FileProviders.Abstractions": "6.0.0",
"Microsoft.Extensions.FileSystemGlobbing": "6.0.0",
"NuGet.Credentials": "6.6.1",
"NuGet.ProjectModel": "6.6.1"
}
},
"NuGet.DependencyResolver.Core": {
"type": "Direct",
"requested": "[6.4.0, )",
"resolved": "6.4.0",
"contentHash": "AKomZEKuhQlshujuiHbKvwl2cZNGq3SHsXFbpjCfCjMFMLwwA8saJGQQZp1lzsqQWcQWa6hLOcPtm7T3rd0SVg==",
"requested": "[6.6.1, )",
"resolved": "6.6.1",
"contentHash": "K+EXXLU37PBnwLGx6WnVGxlfWYkdedvUUOeDMERXelNgjg20irtKf3hk+wGB7NmxAdNY9/gGcOgSDOV+M0w3Jg==",
"dependencies": {
"NuGet.Configuration": "6.4.0",
"NuGet.LibraryModel": "6.4.0",
"NuGet.Protocol": "6.4.0"
"NuGet.Configuration": "6.6.1",
"NuGet.LibraryModel": "6.6.1",
"NuGet.Protocol": "6.6.1"
}
},
"SemanticVersioning": {
@@ -43,9 +54,9 @@
},
"SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.202.66, )",
"resolved": "1.202.66",
"contentHash": "VTOwwfTPnov6WWJNrsmB9lWs5s+6XVUXtV8SgLvgJTswK11MTA0e+TZFfZJoSZ1WUsE2dvxlMrNOYJ6aL6j0wA==",
"requested": "[1.202.124, )",
"resolved": "1.202.124",
"contentHash": "xw8mbJI2WwZcfWvgMf6c6E3agcQ/IQVVdnKZljszQBKq0cjhJG06AoonM+MI74CrYMJxf+wnA+4bzCt4mxy/Qg==",
"dependencies": {
"protobuf-net": "1.0.0"
}
@@ -64,6 +75,32 @@
"resolved": "6.0.0",
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "f34u2eaqIjNO9YLHBz8rozVZ+TcFiFs0F3r7nUJd7FRkVSxk8u4OpoK226mi49MwexHOR2ibP9MFvRUaLilcQQ==",
"dependencies": {
"Microsoft.Extensions.Primitives": "7.0.0"
}
},
"Microsoft.Extensions.FileProviders.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "0pd4/fho0gC12rQswaGQxbU34jOS1TPS8lZPpkFCH68ppQjHNHYle9iRuHeev1LhrJ94YPvzcRd8UmIuFk23Qw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "6.0.0"
}
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "ip8jnL1aPiaPeKINCqaTEbvBFDmVx9dXQEBZ2HOBRXPD1eabGNqP/bKlsIcp7U2lGxiXd5xIhoFcmY8nM4Hdiw=="
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q=="
},
"Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.1",
@@ -71,75 +108,75 @@
},
"NuGet.Common": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "srECugLk+LB1bXelDCDhHoi6do/EYTXzuntKhjHraS4roVB3NfWohEdCSiAPdpSV9M40Q6jo6MV2Srml9e+jHQ==",
"resolved": "6.6.1",
"contentHash": "hW5NtShErO3qbdkyv7doCRsFNK9Rlcc7mVjYM+hg1sOAWheTh/oo95DzNbsZthiqyHZfaioopfWtzmoxNw9h4g==",
"dependencies": {
"NuGet.Frameworks": "6.4.0"
"NuGet.Frameworks": "6.6.1"
}
},
"NuGet.Configuration": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "vPjauG9AoacEjiZWGIs+d11FCRVmseqAw78FIApfLvZrYMEbbwc9vc0LdC3PpoW5FxYkktyZSiiXVKXGLu+gXw==",
"resolved": "6.6.1",
"contentHash": "9WbK8wgwPfRpSwuG+ZhMshE48qUYvPIw7VNLCncrq/in4vE6SGsuawPSxPJkkLBtcKTGbPMez5JDvUf6vEBgKg==",
"dependencies": {
"NuGet.Common": "6.4.0",
"NuGet.Common": "6.6.1",
"System.Security.Cryptography.ProtectedData": "4.4.0"
}
},
"NuGet.Credentials": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "tebsxclknVz3D4FrvE2MzVcsOyf6PffjGNQ77X9Yvbj9x5YpVWfumVPetqETcdsNEgiN0bBzfMre33lhrY7Itw==",
"resolved": "6.6.1",
"contentHash": "TuOlXcE1ajwdtfnQaUjDv2xO2u/WDS56/b5jHfEBZetKfcpT0W3iNOqInVPO0qxRxXK5/HXUKVr2Pya1LsVVnA==",
"dependencies": {
"NuGet.Protocol": "6.4.0"
"NuGet.Protocol": "6.6.1"
}
},
"NuGet.Frameworks": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "qcufbjJIDtyY/Hah7JJfcRVpRYM3scgPqYBnukjO9kfADCFGr2azvVBozuwzljA6w/cR3w8bXLq6vW5xGrsmHw=="
"resolved": "6.6.1",
"contentHash": "iRtDhL0zPqVw037fHEK9bQljTKPuOHhfIkz86/IH2P8eetr910HTTe5G8lJTuzZHh592Ze/sYhh173HIFjPSfg=="
},
"NuGet.LibraryModel": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "K6ROQpWr34Aje81G0HfipiznLTB8vD4BO8sF6FEwx1KjJVdFkSmGZPmAhc6L1vZPs8TKY5BqoH72zG13zVzW2w==",
"resolved": "6.6.1",
"contentHash": "B0KH19sNNUq56YfEozIsIpk8EOyolG0LRT+hqG1/mhuXlQFiP9BgT6pZgwLQVLUl9YBDx3+KWQQbl6pz8Yh/Sw==",
"dependencies": {
"NuGet.Common": "6.4.0",
"NuGet.Versioning": "6.4.0"
"NuGet.Common": "6.6.1",
"NuGet.Versioning": "6.6.1"
}
},
"NuGet.Packaging": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "aR10aYqcUMGC2mwMGH5rls/MGaz3EVH8DKTTHQ/EC91hXNtrCTTAQonaRR+v1EItcoxtQeZ/WQOorv4z270Tgg==",
"resolved": "6.6.1",
"contentHash": "GwhFi2Ep4YzAGQFYz1OsMVNfiJ1M46nyCgHQ7xjJSMvxDYFgodR1RqVugWFMbIUUq6I8iYASwp5lpHXvITeuIQ==",
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"NuGet.Configuration": "6.4.0",
"NuGet.Versioning": "6.4.0",
"NuGet.Configuration": "6.6.1",
"NuGet.Versioning": "6.6.1",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Cryptography.Pkcs": "5.0.0"
}
},
"NuGet.ProjectModel": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "eW9Q7vPk8cpXDd5b+vtIPkl8dSDCPkPJPrjXPTfZGxhstldnhJrj1XPaonsDZLQ24YY7LrYCzC0BiHh3iO5zUA==",
"resolved": "6.6.1",
"contentHash": "CEyRXXvgIoEQBWn3WZupjkIVC6rPcGUAO5p4Gz+fnF8kcefWQOXHfnOE+UKZ0WwAJG5iMWRvXBKAGOuFiFhNpQ==",
"dependencies": {
"NuGet.DependencyResolver.Core": "6.4.0"
"NuGet.DependencyResolver.Core": "6.6.1"
}
},
"NuGet.Protocol": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "KIPjsWP0P3EMsDsXaa6YBCTvYKur/zI0luS1kO5G37ci8mHs2kJFsuG5qaMhGvgyHASu54sxlic1n1oza2Pcbw==",
"resolved": "6.6.1",
"contentHash": "HhKLsK6Q0NNp6qb0T26GLR5gCTRZu+gzqDVK4xqXHZmsolaDVIdIYpn44b2etaVYLzNJCvgRkw+I422u2bIvMw==",
"dependencies": {
"NuGet.Packaging": "6.4.0"
"NuGet.Packaging": "6.6.1"
}
},
"NuGet.Versioning": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "YE8p3TpX4jIw+Gb24maE8YRDoqWA4imLmCbdOj5IvslLrZJXQ8akeFOGOplxICNVevON1g1SFYT2+cq4yy0nQQ=="
"resolved": "6.6.1",
"contentHash": "Wm/AOFICTIrCgbVxv9dNWusraTzcggbo5W4ao7hD8NNVq911an9TGwW+uNuYc8I5PkpTeMuSXneV2u6hbi1P4w=="
},
"protobuf-net": {
"type": "Transitive",

View File

@@ -11,7 +11,7 @@
<repository type="git" url="https://github.com/PveTeam/Torch" />
<dependencies>
<group targetFramework="net7.0-windows7.0">
<dependency id="SpaceEngineersDedicated.ReferenceAssemblies" version="1.202.66" />
<dependency id="SpaceEngineersDedicated.ReferenceAssemblies" version="1.202.120" />
<dependency id="Torch.Server" version="torchVersion" />
</group>
</dependencies>

View File

@@ -17,8 +17,8 @@
</PropertyGroup>
<!-- <Import Project="$(SolutionDir)\TransformOnBuild.targets" /> -->
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="NLog" Version="5.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>

View File

@@ -16,6 +16,7 @@ using Microsoft.Extensions.Configuration;
using NLog;
using NLog.Targets;
using Sandbox.Engine.Utils;
using SpaceEngineers.Game;
using Torch.Utils;
using VRage.FileSystem;
@@ -29,9 +30,8 @@ namespace Torch.Server
private bool _init;
private const string TOOL_DIR = "tool";
private const string TOOL_ZIP = "temp.zip";
private static readonly string TOOL_EXE = "DepotDownloader.exe";
private const string TOOL_ARGS = "-app 298740 -depot {1} -dir \"{0}\"";
private static readonly int[] Depots = { 298741, 1004 };
private static readonly string TOOL_EXE = "steamcmd.exe";
private const string TOOL_ARGS = "+force_install_dir \"{0}\" +login anonymous +app_update 298740 +quit";
private TorchServer _server;
internal Persistent<TorchConfig> ConfigPersistent { get; }
@@ -84,9 +84,9 @@ namespace Torch.Server
return true;
}
public void Run()
public void Run(IConfiguration configuration)
{
_server = new TorchServer(Config, ApplicationContext.Current.InstanceDirectory.FullName, ApplicationContext.Current.InstanceName);
_server = new TorchServer(Config, ApplicationContext.Current.InstanceDirectory.FullName, ApplicationContext.Current.InstanceName, configuration);
if (ApplicationContext.Current.IsService || Config.NoGui)
{
@@ -103,6 +103,8 @@ namespace Torch.Server
}
#endif
_server.Init();
var uiThread = new Thread(() =>
{
var ui = new TorchUI(_server);
@@ -116,19 +118,19 @@ namespace Torch.Server
uiThread.SetApartmentState(ApartmentState.STA);
uiThread.Start();
_server.Init();
if (Config.Autostart || Config.TempAutostart)
{
Config.TempAutostart = false;
_server.Start();
}
uiThread.Join();
}
}
public static async Task RunSteamCmdAsync(IConfiguration configuration)
{
var log = LogManager.GetLogger("SteamTool");
var log = LogManager.GetLogger("SteamCMD");
var path = configuration.GetValue<string>("steamToolPath") ?? ApplicationContext.Current.TorchDirectory
.CreateSubdirectory(TOOL_DIR).FullName;
@@ -138,39 +140,32 @@ namespace Torch.Server
Directory.CreateDirectory(path);
}
var steamCmdExePath = Path.Combine(path, TOOL_EXE);
if (!File.Exists(steamCmdExePath))
var toolExe = Path.Combine(path, TOOL_EXE);
if (!File.Exists(toolExe))
{
try
{
log.Info("Downloading Steam Tool.");
log.Info("Downloading SteamCMD.");
using (var client = new HttpClient())
await using (var file = File.Create(TOOL_ZIP))
await using (var stream = await client.GetStreamAsync("https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.4.7/depotdownloader-2.4.7.zip"))
await using (var stream = await client.GetStreamAsync("https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip"))
await stream.CopyToAsync(file);
ZipFile.ExtractToDirectory(TOOL_ZIP, path);
File.Delete(TOOL_ZIP);
log.Info("Steam Tool downloaded successfully!");
log.Info("SteamCMD downloaded successfully!");
}
catch (Exception e)
{
log.Error(e, "Failed to download Steam Tool, unable to update the DS.");
log.Error(e, "Failed to download SteamCMD, unable to update the DS.");
return;
}
}
log.Info("Checking for DS updates.");
foreach (var depot in Depots)
var steamCmdProc = new ProcessStartInfo(toolExe)
{
await DownloadDepot(depot);
}
async Task DownloadDepot(int depotId)
{
var steamCmdProc = new ProcessStartInfo(steamCmdExePath)
{
Arguments = string.Format(TOOL_ARGS, configuration.GetValue("gamePath", "../"), depotId),
Arguments = string.Format(TOOL_ARGS, configuration.GetValue("gamePath", "../")),
WorkingDirectory = path,
RedirectStandardOutput = true
};
@@ -183,5 +178,4 @@ namespace Torch.Server
}
}
}
}
}

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Havok;
using NLog;
@@ -35,7 +36,45 @@ namespace Torch.Server.Managers
{
private const string CONFIG_NAME = "SpaceEngineers-Dedicated.cfg";
public event Action<ConfigDedicatedViewModel> InstanceLoaded;
private Action<ConfigDedicatedViewModel> _instanceLoaded;
/// <summary>
/// Gets or sets the instance loaded event.
/// </summary>
/// <remarks>
/// Called when the instance is loaded and immediately if subscribed after the instance is loaded.
/// </remarks>
public event Action<ConfigDedicatedViewModel> InstanceLoaded
{
add
{
var action = _instanceLoaded;
Action<ConfigDedicatedViewModel> action2;
do
{
action2 = action;
var action3 = (Action<ConfigDedicatedViewModel>)Delegate.Combine(action2, value);
action = Interlocked.CompareExchange(ref _instanceLoaded, action3, action2);
}
while (action != action2);
if (DedicatedConfig is not null)
value(DedicatedConfig);
}
remove
{
var action = _instanceLoaded;
Action<ConfigDedicatedViewModel> action2;
do
{
action2 = action;
var action3 = (Action<ConfigDedicatedViewModel>)Delegate.Remove(action2, value);
action = Interlocked.CompareExchange(ref _instanceLoaded, action3, action2);
}
while (action != action2);
}
}
public ConfigDedicatedViewModel DedicatedConfig { get; set; }
private static readonly Logger Log = LogManager.GetLogger(nameof(InstanceManager));
[Dependency]
@@ -102,7 +141,7 @@ namespace Torch.Server.Managers
SelectWorld(DedicatedConfig.LoadWorld ?? DedicatedConfig.Worlds.First().WorldPath, false);
InstanceLoaded?.Invoke(DedicatedConfig);
_instanceLoaded?.Invoke(DedicatedConfig);
}
public void SelectCreatedWorld(string worldPath)

View File

@@ -32,7 +32,7 @@ namespace Torch.Server.Managers
{
if (newstate == TorchGameState.Loading && MySandboxGame.ConfigDedicated.RemoteApiEnabled && !string.IsNullOrEmpty(MySandboxGame.ConfigDedicated.RemoteSecurityKey))
{
var myRemoteServer = new MyRemoteServer(MySandboxGame.ConfigDedicated.RemoteApiPort, MySandboxGame.ConfigDedicated.RemoteSecurityKey);
var myRemoteServer = new MyRemoteServer(MySandboxGame.ConfigDedicated.RemoteApiIP, MySandboxGame.ConfigDedicated.RemoteApiPort, MySandboxGame.ConfigDedicated.RemoteSecurityKey);
LogManager.GetCurrentClassLogger().Info($"Remote API started on port {myRemoteServer.Port}");
}
}

View File

@@ -39,7 +39,7 @@ namespace Torch.Server
context.GameBinariesDirectory.FullName);
#endif
initializer.Run();
initializer.Run(configuration);
}
private static void SetupLogging(IApplicationContext context, IConfiguration configuration)

View File

@@ -34,24 +34,23 @@
<ItemGroup>
<PackageReference Include="AutoCompleteTextBox" Version="1.6.0" />
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
<PackageReference Include="ControlzEx" Version="5.0.2" />
<PackageReference Include="ControlzEx" Version="6.0.0" />
<PackageReference Include="MahApps.Metro" Version="2.4.9" />
<PackageReference Include="MdXaml" Version="1.16.2" />
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="2.2.343001" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
<PackageReference Include="MdXaml" Version="1.20.1" />
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="2.4.416101" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="7.0.0" />
<PackageReference Include="NLog" Version="5.1.0" />
<PackageReference Include="PropertyChanged.Fody" Version="4.0.3" PrivateAssets="all" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="all" />
<PackageReference Include="Steamworks.NET" Version="20.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Management" Version="7.0.0" />
<PackageReference Include="nulastudio.NetCoreBeauty" Version="1.2.9.3" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.66">
<PackageReference Include="System.Management" Version="7.0.2" />
<PackageReference Include="nulastudio.NetCoreBeauty" Version="1.2.9.5" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.124">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>

View File

@@ -8,6 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading;
using Microsoft.Diagnostics.Runtime;
using Microsoft.Extensions.Configuration;
using NLog;
using PropertyChanged;
using Sandbox;
@@ -46,8 +47,9 @@ namespace Torch.Server
//Here to trigger rebuild
/// <inheritdoc />
public TorchServer(ITorchConfig config, string instancePath, string instanceName) : base(config)
public TorchServer(ITorchConfig config, string instancePath, string instanceName, IConfiguration configuration) : base(config)
{
Configuration = configuration;
InstancePath = instancePath;
InstanceName = instanceName;
DedicatedInstance = new InstanceManager(this);
@@ -57,7 +59,7 @@ namespace Torch.Server
AddManager(new RemoteAPIManager(this));
var sessionManager = Managers.GetManager<ITorchSessionManager>();
sessionManager.AddFactory(x => new MultiplayerManagerDedicated(this));
sessionManager.AddFactory(_ => new MultiplayerManagerDedicated(this));
sessionManager.SessionStateChanged += OnSessionStateChanged;
// Needs to be done at some point after MyVRageWindows.Init
@@ -67,6 +69,14 @@ namespace Torch.Server
_simUpdateTimer.Elapsed += SimUpdateElapsed;
_simUpdateTimer.Start();
Console.CancelKeyPress += (_, _) =>
{
if (State == ServerState.Running)
Stop();
Environment.Exit(0);
};
}
private void SimUpdateElapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -119,7 +129,38 @@ namespace Torch.Server
/// <inheritdoc />
public ServerState State { get; private set; }
public event Action<ITorchServer> Initialized;
private Action<ITorchServer> _initializedEvent;
public event Action<ITorchServer> Initialized
{
add
{
var action = _initializedEvent;
Action<ITorchServer> action2;
do
{
action2 = action;
var action3 = (Action<ITorchServer>)Delegate.Combine(action2, value);
action = Interlocked.CompareExchange(ref _initializedEvent, action3, action2);
}
while (action != action2);
if (GetManager<InstanceManager>().DedicatedConfig != null)
value(this); //if already initialized
}
remove
{
var action = _initializedEvent;
Action<ITorchServer> action2;
do
{
action2 = action;
var action3 = (Action<ITorchServer>)Delegate.Remove(action2, value);
action = Interlocked.CompareExchange(ref _initializedEvent, action3, action2);
}
while (action != action2);
}
}
public int OnlinePlayers { get; private set; }
@@ -130,10 +171,12 @@ namespace Torch.Server
base.Init();
GetManager<InstanceManager>().LoadInstance(InstancePath);
CanRun = true;
Initialized?.Invoke(this);
_initializedEvent?.Invoke(this);
Log.Info($"Initialized server '{InstanceName}' at '{InstancePath}'");
}
public override IConfiguration Configuration { get; }
/// <inheritdoc />
public override void Start()
{
@@ -204,9 +247,14 @@ namespace Torch.Server
StopInternal();
LogManager.Flush();
if (
#if DEBUG
Environment.Exit(0);
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
true ||
#endif
ApplicationContext.Current.IsService
)
Environment.Exit(0);
var exe = Path.Combine(AppContext.BaseDirectory, "Torch.Server.exe");

View File

@@ -116,7 +116,7 @@ namespace Torch.Server
if (_server?.State == ServerState.Running)
_server.Stop();
Process.GetCurrentProcess().Kill();
Environment.Exit(0);
}
}
}

View File

@@ -19,12 +19,12 @@
},
"ControlzEx": {
"type": "Direct",
"requested": "[5.0.2, )",
"resolved": "5.0.2",
"contentHash": "f724LoDJ36LxaLR62G4ek9ZAJI8BiiYRJJ04furC/qjXSeIwU0qmHFIe19xB1/FwxyZjevdFguEr9ZUjf3dZgw==",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "MEaqj6ienvKR4E7QJ3vwzo2vrdy2Kqw9Z3CudY5iUixR5iMYeLoMlks7EiABsz4WqDsgVLd9u7fixmCOGU+4ow==",
"dependencies": {
"Microsoft.Xaml.Behaviors.Wpf": "1.1.31",
"System.Text.Json": "5.0.1"
"Microsoft.Xaml.Behaviors.Wpf": "1.1.39",
"System.Text.Json": "5.0.2"
}
},
"MahApps.Metro": {
@@ -38,34 +38,25 @@
},
"MdXaml": {
"type": "Direct",
"requested": "[1.16.2, )",
"resolved": "1.16.2",
"contentHash": "UxYWJaXugQ+v4txS7K8sw26bxS6xvjSW+f79U/oMBtm+cVvZSmBGRZkB77rzaoXAyrbixX0Vk0U+1f22TT2uWg==",
"requested": "[1.20.1, )",
"resolved": "1.20.1",
"contentHash": "fx64BBFK7yO2MHBxMAMV4/b3x24rQ7Gfn64CISaw4dS7Wvr0HGc4vHNyrMY+/CgEpOEATLVgtM1a9liQ+QOesA==",
"dependencies": {
"AvalonEdit": "6.0.0",
"MdXaml.Plugins": "1.16.2"
"MdXaml.Plugins": "1.20.1"
}
},
"Microsoft.Diagnostics.Runtime": {
"type": "Direct",
"requested": "[2.2.343001, )",
"resolved": "2.2.343001",
"contentHash": "nVwXLEJiXbnnNkQPcWy64DMWNBvMg9XKWpfBBNMVs1gbEJ9HUVTcAA862mOjgyKryAtvGVKkeQ/9cW6pK8YAiA==",
"requested": "[2.4.416101, )",
"resolved": "2.4.416101",
"contentHash": "BUGBGNmjLWnRJ+Oqj23aDKjulOqDk6q62oQzeg9FghfphhhuTwlNLGHV88vKKldx+NHjWUzF3eUPUFxhROrcyQ==",
"dependencies": {
"Microsoft.Diagnostics.NETCore.Client": "0.2.251802",
"System.Collections.Immutable": "5.0.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "tgU4u7bZsoS9MKVRiotVMAwHtbREHr5/5zSEV+JPhg46+ox47Au84E3D2IacAaB0bk5ePNaNieTlPrfjbbRJkg==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.Extensions.Configuration.CommandLine": {
"type": "Direct",
"requested": "[7.0.0, )",
@@ -101,30 +92,30 @@
},
"NLog": {
"type": "Direct",
"requested": "[5.1.0, )",
"resolved": "5.1.0",
"contentHash": "oW7ekrkRG9okpDMUcEglunWj8Qf2RY8qkgl+/chJoavzg3dbT13y32t19R54FKkmq80fKzw4ZekZkCrRGanKgQ=="
"requested": "[5.2.2, )",
"resolved": "5.2.2",
"contentHash": "r6Q9740g29gTwmTWlsgdIFm0mhNsfNZmbvWKX/Fxmi8X89ZrpUowHM2T2X1lP7RVpND+ef+XnfKL5g6Q1iNGXA=="
},
"nulastudio.NetCoreBeauty": {
"type": "Direct",
"requested": "[1.2.9.3, )",
"resolved": "1.2.9.3",
"contentHash": "ToUOoX/sNCg6oeMcSrHYBBRPjKp1gDS7I5WNnY+59t7iNFPcAojpc2lYmgCm3hxwXW/xCxyQIV4k5agegqc3fg=="
"requested": "[1.2.9.5, )",
"resolved": "1.2.9.5",
"contentHash": "0w2QtE3ir6z9J4fZpW1s3/V93dnceUmVm/E1ADhbt0WJ8z1Q3UhYe0Z7rXCy7Pl3y+zRQwERSV9N0aBuGABLjw=="
},
"PropertyChanged.Fody": {
"type": "Direct",
"requested": "[4.0.3, )",
"resolved": "4.0.3",
"contentHash": "vRxEDydahhcetswKaoUug7mQywgpZpHoeHZWa7Opb+H+eWPUQo+f+v37Jy+rrG1RVOCkyziTgCkNetXzNlUXJw==",
"requested": "[4.1.0, )",
"resolved": "4.1.0",
"contentHash": "6v+f9cI8YjnZH2WBHuOqWEAo8DFFNGFIdU8xD3AsL6fhV6Y8oAmVWd7XKk49t8DpeUBwhR/X+97+6Epvek0Y3A==",
"dependencies": {
"Fody": "6.6.3"
"Fody": "6.6.4"
}
},
"SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.202.66, )",
"resolved": "1.202.66",
"contentHash": "VTOwwfTPnov6WWJNrsmB9lWs5s+6XVUXtV8SgLvgJTswK11MTA0e+TZFfZJoSZ1WUsE2dvxlMrNOYJ6aL6j0wA==",
"requested": "[1.202.124, )",
"resolved": "1.202.124",
"contentHash": "xw8mbJI2WwZcfWvgMf6c6E3agcQ/IQVVdnKZljszQBKq0cjhJG06AoonM+MI74CrYMJxf+wnA+4bzCt4mxy/Qg==",
"dependencies": {
"protobuf-net": "1.0.0"
}
@@ -143,9 +134,9 @@
},
"System.Management": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "A4jed4QUviDOm7fJNKAJObEAEkEUXmkGL/w0iyCYTzrl1rezTj8LGFHfsVst4Vb9JwFcTpboiDrvdST48avBpw==",
"requested": "[7.0.2, )",
"resolved": "7.0.2",
"contentHash": "/qEUN91mP/MUQmJnM5y5BdT7ZoPuVrtxnFlbJ8a3kBJGhe2wCzBfnPFtK2wTtEEcf3DMGR9J00GZZfg6HRI6yA==",
"dependencies": {
"System.CodeDom": "7.0.0"
}
@@ -157,15 +148,15 @@
},
"Fody": {
"type": "Transitive",
"resolved": "6.6.3",
"contentHash": "X1WKKgSNYVtLzdO8dK3YWmfmljA4L0soePcWNouq9X6WbVF4bmivuJdlhTZx/2L3ml6tMvhFe8skIbVQ24PAYA=="
"resolved": "6.6.4",
"contentHash": "vLZS+oa+ndUHYPlx/8n9bBTT3dHkCF0riml4paKq4D663+cZd47x1uagQo32D/gKFZ/sfmV1oqKaLmH0elxq4A=="
},
"HarmonyX": {
"type": "Transitive",
"resolved": "2.10.2-prerelease.4",
"contentHash": "M/44/DhSu1WR8gL62aLPGKqAJ0rrgkw38nT3DgEvLAvyIoQLJmL2Jsn4/d4CC0eDT1Vv82cB9Mxgg0sFD3/qrQ==",
"resolved": "2.10.2-prerelease.6",
"contentHash": "CPCUR/t5AQ5DDs40bTJ5OwUVTCoZONaJGbWKKjAOwg7c7Ct4KEbfybH6T+KvRGVjf5eN1oyGY5BN7EfWxUh9Xg==",
"dependencies": {
"MonoModReorg.RuntimeDetour": "23.3.22.1"
"MonoMod.RuntimeDetour": "25.0.0"
}
},
"JorgeSerrano.Json.JsonSnakeCaseNamingPolicy": {
@@ -175,8 +166,8 @@
},
"MdXaml.Plugins": {
"type": "Transitive",
"resolved": "1.16.2",
"contentHash": "EOMENHbLkpRk7+UItuutDuETiJpSCZgBATBRk7WSuxO16NUfzrS39ja4RhIQ0Ax8u0RH1wCAS0VINYPZqxfJeg=="
"resolved": "1.20.1",
"contentHash": "+pLkHJ8LuTVdZ0FM5c9ftjaebN4L7I4ShhXideTSos8rfULFSzLFuBWZot22A9yljuEpn5FbPw04Jrrs/il9ng=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
@@ -185,29 +176,27 @@
},
"Microsoft.CodeAnalysis.Analyzers": {
"type": "Transitive",
"resolved": "3.3.3",
"contentHash": "j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ=="
"resolved": "3.3.4",
"contentHash": "AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g=="
},
"Microsoft.CodeAnalysis.Common": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "JfHupS/B7Jb5MZoYkFFABn3mux0wQgxi2D8F/rJYZeRBK2ZOyk7TjQ2Kq9rh6W/DCh0KNbbSbn5qoFar+ueHqw==",
"resolved": "4.6.0",
"contentHash": "N3uLvekc7DjvE1BX8YW7UH7ldjA4ps/Tun2YmOoSIItJrh1gnQIMKUbK1c3uQUx2NHbLibVZI4o/VB9xb4B7tA==",
"dependencies": {
"Microsoft.CodeAnalysis.Analyzers": "3.3.3",
"System.Collections.Immutable": "6.0.0",
"System.Memory": "4.5.5",
"System.Reflection.Metadata": "5.0.0",
"Microsoft.CodeAnalysis.Analyzers": "3.3.4",
"System.Collections.Immutable": "7.0.0",
"System.Reflection.Metadata": "7.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encoding.CodePages": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
"System.Text.Encoding.CodePages": "7.0.0"
}
},
"Microsoft.CodeAnalysis.CSharp": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "eD2w0xHRoaqK07hjlOKGR9eLNy3nimiGNeCClNax1NDgS/+DBtBqCjXelOa+TNy99kIB3nHhUqDmr46nDXy/RQ==",
"resolved": "4.6.0",
"contentHash": "9pyFZUN2Lyu3C0Xfs49kezfH+CzQHMibGsQeQPu0P+GWyH2XXDwmyZ6jAaKQGNUXOJfC2OK01hWMJTJY315uDQ==",
"dependencies": {
"Microsoft.CodeAnalysis.Common": "[4.4.0]"
"Microsoft.CodeAnalysis.Common": "[4.6.0]"
}
},
"Microsoft.Diagnostics.NETCore.Client": {
@@ -236,6 +225,14 @@
"Microsoft.Extensions.Primitives": "7.0.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "7.0.4",
"contentHash": "8+XPvJnHZsYgHOQlcMuQe7QNF5KdVKHH1F/wW3nd8/u81Gk/XFAYMDP0Lpz18h7/AM95M662vvqMorcYxCBB4w==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.Extensions.Configuration.FileExtensions": {
"type": "Transitive",
"resolved": "7.0.0",
@@ -308,58 +305,58 @@
},
"Microsoft.Xaml.Behaviors.Wpf": {
"type": "Transitive",
"resolved": "1.1.31",
"contentHash": "LZpuf82ACZWldmfMuv3CTUMDh3o0xo0uHUaybR5HgqVLDBJJ9RZLykplQ/bTJd0/VDt3EhD4iDgUgbdIUAM+Kg=="
"resolved": "1.1.39",
"contentHash": "8PZKqw9QOcu42xk8puY4P1+EXHL9YGOR9b7qhaYx5cILHul456H073tj99vyPcCt0W0781T9RwHqkx507ZyUpQ=="
},
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.11.4",
"contentHash": "IC1h5g0NeJGHIUgzM1P82ld57knhP0IcQfrYITDPXlNpMYGUrsG5TxuaWTjaeqDNQMBDNZkB8L0rBnwsY6JHuQ=="
},
"MonoModReorg.Backports": {
"MonoMod.Backports": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "nLx18prtZbS0nVO8YHElP+TUj1kkDswRgQpa9agt3tyNWke9Kqk5lVkGu87Y3cCMhG+m5Ai0ZDH0+V5B6bXF+Q==",
"resolved": "1.0.0",
"contentHash": "J59I4CMe24aCmWboHCDzQIk37kXqHnJH6KQfDGstlznuDni7Lwdd/8CywmEwVXjVEgfs5yQzvOTW3Xg1NH7fDQ==",
"dependencies": {
"MonoModReorg.ILHelpers": "23.3.22.1"
"MonoMod.ILHelpers": "1.0.0"
}
},
"MonoModReorg.Core": {
"MonoMod.Core": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "Q3ZOgm6AOTL0icgcHsT/6mV5kYt6meqX3DEN1p/et5PxJsXUhVkiZfAptp8y/i+cO6HNgkcESpXEQ4jUWVwsDA==",
"resolved": "1.0.0",
"contentHash": "FlzAEa4ujbA1t3rbKxuW3DP36T0/L6k2IP1F4QXM1cOXMJLHm39Azjt98E/9LFRFBWYFdlMUmg+4THLv2xyisA==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoModReorg.Backports": "23.3.22.1",
"MonoModReorg.ILHelpers": "23.3.22.1",
"MonoModReorg.Utils": "23.3.22.1"
"MonoMod.Backports": "1.0.0",
"MonoMod.ILHelpers": "1.0.0",
"MonoMod.Utils": "25.0.0"
}
},
"MonoModReorg.ILHelpers": {
"MonoMod.ILHelpers": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "dHE/3VZtnTUTkQ34j8Gu6CxKes1QDL8tBuF3QElxHHpPl/QabGCK938k47WWRcRBMoP7IAthkn+Bob4H97rBgw=="
"resolved": "1.0.0",
"contentHash": "dTjGA+dYl7W5yQ0oG/Wr57tsa+ueoFUrwPtz9MZF9iheun4n70u7lge52F8UJi9i0zMHRfS2mAY6+nPuRZHQyQ=="
},
"MonoModReorg.RuntimeDetour": {
"MonoMod.RuntimeDetour": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "cUES3Hi7QJtBNe0qwVdjZOCDkZDaCpdqS6Au0RaCyQ1PDIR4av13E9qBNAEYew46sgPe0fOrU334md6DLDGHlQ==",
"resolved": "25.0.0",
"contentHash": "u+G34uSEjU0+fk4Iz3Mfws/+E4kW460i6fBz1b4L/yxSndfmdKkJ+pYbU9pwh7IUxgk0Ko0+Mx3fSUQPaNk8nA==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoModReorg.Backports": "23.3.22.1",
"MonoModReorg.Core": "23.3.22.1",
"MonoModReorg.ILHelpers": "23.3.22.1",
"MonoModReorg.Utils": "23.3.22.1"
"MonoMod.Backports": "1.0.0",
"MonoMod.Core": "1.0.0",
"MonoMod.ILHelpers": "1.0.0",
"MonoMod.Utils": "25.0.0"
}
},
"MonoModReorg.Utils": {
"MonoMod.Utils": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "q1cX0mbYxdw2WcE/qGBB84lVY/ffobEr46VQFuwGcWhtw6f1Ql1k4TZfs8gebpesSxHnca13grLeVHrUSpy1+g==",
"resolved": "25.0.0",
"contentHash": "E8m0pH3Kact+A2qH+lxMis90K8+ixInwprn0R1nuAMRHfotHUHeYmr304UEPeInSuY3+IlnC+OB8fqbQiTsWlQ==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoModReorg.Backports": "23.3.22.1",
"MonoModReorg.ILHelpers": "23.3.22.1"
"MonoMod.Backports": "1.0.0",
"MonoMod.ILHelpers": "1.0.0"
}
},
"Newtonsoft.Json": {
@@ -369,107 +366,112 @@
},
"NuGet.Commands": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "j3ma45boGZADsHpJcu3Y2yq+n2luicC6ezd61TXTTzbOzA452oAPaSsFGUB1stIsuP/DVoqkTzjHXjaCHuJKPQ==",
"resolved": "6.6.1",
"contentHash": "D1b7gTk1wp7sxscLhS8O/yoErsRVbR4zJvLVD4jo1sgxh42ZOWKpMkhznPUxpvmCxBhw9hAy8/yWrRH91SfdEQ==",
"dependencies": {
"NuGet.Credentials": "6.4.0",
"NuGet.ProjectModel": "6.4.0"
"Microsoft.Extensions.FileProviders.Abstractions": "6.0.0",
"Microsoft.Extensions.FileSystemGlobbing": "6.0.0",
"NuGet.Credentials": "6.6.1",
"NuGet.ProjectModel": "6.6.1"
}
},
"NuGet.Common": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "srECugLk+LB1bXelDCDhHoi6do/EYTXzuntKhjHraS4roVB3NfWohEdCSiAPdpSV9M40Q6jo6MV2Srml9e+jHQ==",
"resolved": "6.6.1",
"contentHash": "hW5NtShErO3qbdkyv7doCRsFNK9Rlcc7mVjYM+hg1sOAWheTh/oo95DzNbsZthiqyHZfaioopfWtzmoxNw9h4g==",
"dependencies": {
"NuGet.Frameworks": "6.4.0"
"NuGet.Frameworks": "6.6.1"
}
},
"NuGet.Configuration": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "vPjauG9AoacEjiZWGIs+d11FCRVmseqAw78FIApfLvZrYMEbbwc9vc0LdC3PpoW5FxYkktyZSiiXVKXGLu+gXw==",
"resolved": "6.6.1",
"contentHash": "9WbK8wgwPfRpSwuG+ZhMshE48qUYvPIw7VNLCncrq/in4vE6SGsuawPSxPJkkLBtcKTGbPMez5JDvUf6vEBgKg==",
"dependencies": {
"NuGet.Common": "6.4.0",
"NuGet.Common": "6.6.1",
"System.Security.Cryptography.ProtectedData": "4.4.0"
}
},
"NuGet.Credentials": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "tebsxclknVz3D4FrvE2MzVcsOyf6PffjGNQ77X9Yvbj9x5YpVWfumVPetqETcdsNEgiN0bBzfMre33lhrY7Itw==",
"resolved": "6.6.1",
"contentHash": "TuOlXcE1ajwdtfnQaUjDv2xO2u/WDS56/b5jHfEBZetKfcpT0W3iNOqInVPO0qxRxXK5/HXUKVr2Pya1LsVVnA==",
"dependencies": {
"NuGet.Protocol": "6.4.0"
"NuGet.Protocol": "6.6.1"
}
},
"NuGet.DependencyResolver.Core": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "AKomZEKuhQlshujuiHbKvwl2cZNGq3SHsXFbpjCfCjMFMLwwA8saJGQQZp1lzsqQWcQWa6hLOcPtm7T3rd0SVg==",
"resolved": "6.6.1",
"contentHash": "K+EXXLU37PBnwLGx6WnVGxlfWYkdedvUUOeDMERXelNgjg20irtKf3hk+wGB7NmxAdNY9/gGcOgSDOV+M0w3Jg==",
"dependencies": {
"NuGet.Configuration": "6.4.0",
"NuGet.LibraryModel": "6.4.0",
"NuGet.Protocol": "6.4.0"
"NuGet.Configuration": "6.6.1",
"NuGet.LibraryModel": "6.6.1",
"NuGet.Protocol": "6.6.1"
}
},
"NuGet.Frameworks": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "qcufbjJIDtyY/Hah7JJfcRVpRYM3scgPqYBnukjO9kfADCFGr2azvVBozuwzljA6w/cR3w8bXLq6vW5xGrsmHw=="
"resolved": "6.6.1",
"contentHash": "iRtDhL0zPqVw037fHEK9bQljTKPuOHhfIkz86/IH2P8eetr910HTTe5G8lJTuzZHh592Ze/sYhh173HIFjPSfg=="
},
"NuGet.LibraryModel": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "K6ROQpWr34Aje81G0HfipiznLTB8vD4BO8sF6FEwx1KjJVdFkSmGZPmAhc6L1vZPs8TKY5BqoH72zG13zVzW2w==",
"resolved": "6.6.1",
"contentHash": "B0KH19sNNUq56YfEozIsIpk8EOyolG0LRT+hqG1/mhuXlQFiP9BgT6pZgwLQVLUl9YBDx3+KWQQbl6pz8Yh/Sw==",
"dependencies": {
"NuGet.Common": "6.4.0",
"NuGet.Versioning": "6.4.0"
"NuGet.Common": "6.6.1",
"NuGet.Versioning": "6.6.1"
}
},
"NuGet.Packaging": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "aR10aYqcUMGC2mwMGH5rls/MGaz3EVH8DKTTHQ/EC91hXNtrCTTAQonaRR+v1EItcoxtQeZ/WQOorv4z270Tgg==",
"resolved": "6.6.1",
"contentHash": "GwhFi2Ep4YzAGQFYz1OsMVNfiJ1M46nyCgHQ7xjJSMvxDYFgodR1RqVugWFMbIUUq6I8iYASwp5lpHXvITeuIQ==",
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"NuGet.Configuration": "6.4.0",
"NuGet.Versioning": "6.4.0",
"NuGet.Configuration": "6.6.1",
"NuGet.Versioning": "6.6.1",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Cryptography.Pkcs": "5.0.0"
}
},
"NuGet.ProjectModel": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "eW9Q7vPk8cpXDd5b+vtIPkl8dSDCPkPJPrjXPTfZGxhstldnhJrj1XPaonsDZLQ24YY7LrYCzC0BiHh3iO5zUA==",
"resolved": "6.6.1",
"contentHash": "CEyRXXvgIoEQBWn3WZupjkIVC6rPcGUAO5p4Gz+fnF8kcefWQOXHfnOE+UKZ0WwAJG5iMWRvXBKAGOuFiFhNpQ==",
"dependencies": {
"NuGet.DependencyResolver.Core": "6.4.0"
"NuGet.DependencyResolver.Core": "6.6.1"
}
},
"NuGet.Protocol": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "KIPjsWP0P3EMsDsXaa6YBCTvYKur/zI0luS1kO5G37ci8mHs2kJFsuG5qaMhGvgyHASu54sxlic1n1oza2Pcbw==",
"resolved": "6.6.1",
"contentHash": "HhKLsK6Q0NNp6qb0T26GLR5gCTRZu+gzqDVK4xqXHZmsolaDVIdIYpn44b2etaVYLzNJCvgRkw+I422u2bIvMw==",
"dependencies": {
"NuGet.Packaging": "6.4.0"
"NuGet.Packaging": "6.6.1"
}
},
"NuGet.Versioning": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "YE8p3TpX4jIw+Gb24maE8YRDoqWA4imLmCbdOj5IvslLrZJXQ8akeFOGOplxICNVevON1g1SFYT2+cq4yy0nQQ=="
"resolved": "6.6.1",
"contentHash": "Wm/AOFICTIrCgbVxv9dNWusraTzcggbo5W4ao7hD8NNVq911an9TGwW+uNuYc8I5PkpTeMuSXneV2u6hbi1P4w=="
},
"protobuf-net": {
"type": "Transitive",
"resolved": "3.1.26",
"contentHash": "iy+VROYtWZEqDvkUjS6FfzKZNpWRoVGc5h0cupGQT/37Ox0LxPblRKLnw6V0RT1MPclLo8nZp7E2M0f7PNn/Tw==",
"resolved": "3.2.26",
"contentHash": "zBzBiKs4yP+tzQOsRA5WbI/zayS6eFv8g0KIKNPI7/RUY1nk9Oe+STmtbUYkNUkO3T3SidEoZv+tF1nmgTSutQ==",
"dependencies": {
"protobuf-net.Core": "3.1.26"
"protobuf-net.Core": "3.2.26"
}
},
"protobuf-net.Core": {
"type": "Transitive",
"resolved": "3.1.26",
"contentHash": "fuKoDWgAf5ju+ixbJoasVFhnUaT0oWUgrWh1AZ5D0Y5keKHpA93vQB5g6aQNtB4zgeQ4hGEeh0MY9bIbAUPgEw=="
"resolved": "3.2.26",
"contentHash": "s8oJW9dBVxix4p8uqMbeG++DIGjgzOFAKoP2i5wayeeFOKBqG+cCBO2S/CAC4MAFlb5m1Os2m/miLcqRCgqJ7Q==",
"dependencies": {
"System.Collections.Immutable": "7.0.0"
}
},
"SemanticVersioning": {
"type": "Transitive",
@@ -491,11 +493,8 @@
},
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "7.0.0",
"contentHash": "dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ=="
},
"System.Formats.Asn1": {
"type": "Transitive",
@@ -510,15 +509,13 @@
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
}
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ=="
"resolved": "7.0.0",
"contentHash": "MclTG61lsD9sYdpNz9xsKBzjsmsfCtcMZYXz/IUr2zlhaTaABonlr1ESeompTgM+Xk+IwtGYU7/voh3YWB/fWw==",
"dependencies": {
"System.Collections.Immutable": "7.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
@@ -556,21 +553,13 @@
},
"System.Text.Encoding.CodePages": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "ZFCILZuOvtKPauZ/j/swhvw68ZRi9ATCfvGbk1QfydmcXBkIWecWKn/250UH7rahZ5OoDBaiAudJtPvLwzw85A==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "7.0.0",
"contentHash": "LSyCblMpvOe0N3E+8e0skHcrIhgV2huaNcjUUEa8hRtgEAm36aGkRoC8Jxlb6Ra6GSfF29ftduPNywin8XolzQ=="
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "/UM3UK1dXKl8Ybysg/21gM4S8DJgkR+yLU8JwqCVbuNqQNImelntgYFAN5QxR8sJJ1kMx//hOUdf0lltosi8cQ=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
"resolved": "5.0.2",
"contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ=="
},
"Torch.SixLabors.ImageSharp": {
"type": "Transitive",
@@ -584,26 +573,27 @@
"torch": {
"type": "Project",
"dependencies": {
"ControlzEx": "[5.0.2, )",
"HarmonyX": "[2.10.2-prerelease.4, )",
"ControlzEx": "[6.0.0, )",
"HarmonyX": "[2.10.2-prerelease.6, )",
"MahApps.Metro": "[2.4.9, )",
"Microsoft.CodeAnalysis.CSharp": "[4.4.0, )",
"Microsoft.CodeAnalysis.Common": "[4.4.0, )",
"MonoModReorg.RuntimeDetour": "[23.3.22.1, )",
"NLog": "[5.1.0, )",
"Microsoft.CodeAnalysis.CSharp": "[4.6.0, )",
"Microsoft.CodeAnalysis.Common": "[4.6.0, )",
"MonoMod.RuntimeDetour": "[25.0.0, )",
"NLog": "[5.2.2, )",
"System.ComponentModel.Annotations": "[5.0.0, )",
"Torch.API": "[1.0.0, )",
"Torch.SixLabors.ImageSharp": "[1.0.0-beta6, )",
"protobuf-net": "[3.1.26, )"
"protobuf-net": "[3.2.26, )"
}
},
"torch.api": {
"type": "Project",
"dependencies": {
"JorgeSerrano.Json.JsonSnakeCaseNamingPolicy": "[0.9.0, )",
"NLog": "[5.1.0, )",
"NuGet.Commands": "[6.4.0, )",
"NuGet.DependencyResolver.Core": "[6.4.0, )",
"Microsoft.Extensions.Configuration.Binder": "[7.0.4, )",
"NLog": "[5.2.2, )",
"NuGet.Commands": "[6.6.1, )",
"NuGet.DependencyResolver.Core": "[6.6.1, )",
"SemanticVersioning": "[2.0.2, )",
"System.Linq.Async": "[6.0.1, )"
}
@@ -618,9 +608,9 @@
},
"System.Management": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "A4jed4QUviDOm7fJNKAJObEAEkEUXmkGL/w0iyCYTzrl1rezTj8LGFHfsVst4Vb9JwFcTpboiDrvdST48avBpw==",
"requested": "[7.0.2, )",
"resolved": "7.0.2",
"contentHash": "/qEUN91mP/MUQmJnM5y5BdT7ZoPuVrtxnFlbJ8a3kBJGhe2wCzBfnPFtK2wTtEEcf3DMGR9J00GZZfg6HRI6yA==",
"dependencies": {
"System.CodeDom": "7.0.0"
}
@@ -648,11 +638,8 @@
},
"System.Text.Encoding.CodePages": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "ZFCILZuOvtKPauZ/j/swhvw68ZRi9ATCfvGbk1QfydmcXBkIWecWKn/250UH7rahZ5OoDBaiAudJtPvLwzw85A==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "7.0.0",
"contentHash": "LSyCblMpvOe0N3E+8e0skHcrIhgV2huaNcjUUEa8hRtgEAm36aGkRoC8Jxlb6Ra6GSfF29ftduPNywin8XolzQ=="
}
}
}

View File

@@ -17,8 +17,8 @@
</PropertyGroup>
<!-- <Import Project="$(SolutionDir)\TransformOnBuild.targets" /> -->
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="NLog" Version="5.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>

View File

@@ -214,7 +214,8 @@ public class ScriptCompilationManager : Manager
return null;
}
private readonly CSharpCompilationOptions _compilationOptions = new(OutputKind.DynamicallyLinkedLibrary);
private readonly CSharpCompilationOptions _compilationOptions = new(OutputKind.DynamicallyLinkedLibrary,
optimizationLevel: OptimizationLevel.Release, platform: Platform.X64);
private readonly CSharpParseOptions _parseOptions = new(LanguageVersion.CSharp11, DocumentationMode.None);
private CSharpCompilation CreateCompilation(string assemblyFileName, IEnumerable<Script> scripts)

View File

@@ -10,6 +10,7 @@ using Torch.Managers.PatchManager;
using Torch.Managers.PatchManager.MSIL;
using Torch.Utils;
using VRage.Game;
using VRage.GameServices;
namespace Torch.Patches
{
@@ -31,7 +32,7 @@ namespace Torch.Patches
}
public static void Postfix(MyWorkshop.ResultData __result, List<MyObjectBuilder_Checkpoint.ModItem> mods)
{
if (__result.Success) return;
if (__result.Result is MyGameServiceCallResult.OK) return;
_log.Warn("Missing Mods:");
var mismatchMods = mods.Where(b => __result.Mods.All(c => b.PublishedFileId != c.Id));
foreach (var mod in mismatchMods)

View File

@@ -52,7 +52,39 @@ namespace Torch.Managers
/// <inheritdoc />
public IReadOnlyDictionary<Guid, ITorchPlugin> Plugins => _plugins.AsReadOnlyObservable();
public event Action<IReadOnlyCollection<ITorchPlugin>> PluginsLoaded;
private Action<IReadOnlyCollection<ITorchPlugin>> _pluginsLoaded;
private bool _loaded;
public event Action<IReadOnlyCollection<ITorchPlugin>> PluginsLoaded
{
add
{
var action = _pluginsLoaded;
Action<IReadOnlyCollection<ITorchPlugin>> action2;
do
{
action2 = action;
var action3 = (Action<IReadOnlyCollection<ITorchPlugin>>)Delegate.Combine(action2, value);
action = Interlocked.CompareExchange(ref _pluginsLoaded, action3, action2);
}
while (action != action2);
if (_loaded)
value(_plugins.Values.AsReadOnly());
}
remove
{
var action = _pluginsLoaded;
Action<IReadOnlyCollection<ITorchPlugin>> action2;
do
{
action2 = action;
var action3 = (Action<IReadOnlyCollection<ITorchPlugin>>)Delegate.Remove(action2, value);
action = Interlocked.CompareExchange(ref _pluginsLoaded, action3, action2);
}
while (action != action2);
}
}
public PluginManager(ITorchBase torchInstance) : base(torchInstance)
{
@@ -145,7 +177,8 @@ namespace Torch.Managers
plugin.Init(Torch);
}
_log.Info($"Loaded {_plugins.Count} plugins.");
PluginsLoaded?.Invoke(_plugins.Values.AsReadOnly());
_loaded = true;
_pluginsLoaded?.Invoke(_plugins.Values.AsReadOnly());
return;
}
@@ -220,7 +253,8 @@ namespace Torch.Managers
plugin.Init(Torch);
}
_log.Info($"Loaded {_plugins.Count} plugins.");
PluginsLoaded?.Invoke(_plugins.Values.AsReadOnly());
_loaded = true;
_pluginsLoaded?.Invoke(_plugins.Values.AsReadOnly());
}
//debug flag is set when the user asks us to run with a specific plugin for plugin development debug

View File

@@ -49,8 +49,6 @@ namespace Torch.Session
public TorchSessionManager(ITorchBase torchInstance) : base(torchInstance)
{
_overrideMods = new Dictionary<ulong, MyObjectBuilder_Checkpoint.ModItem>();
if (Torch.Config.UgcServiceType == UGCServiceType.Steam)
_overrideMods.Add(ModCommunication.MOD_ID, ModItemUtils.Create(ModCommunication.MOD_ID));
}
/// <inheritdoc/>
@@ -74,7 +72,9 @@ namespace Torch.Session
{
if (_overrideMods.ContainsKey(modId))
return false;
var item = ModItemUtils.Create(modId);
#pragma warning disable CS0618
var item = ModItemUtils.Create(modId, TorchBase.Instance.Config.UgcServiceType.ToString());
#pragma warning restore CS0618
_overrideMods.Add(modId, item);
OverrideModsChanged?.Invoke(new CollectionChangeEventArgs(CollectionChangeAction.Add, item));
@@ -193,6 +193,8 @@ namespace Torch.Session
MySession.AfterLoading += SessionLoaded;
MySession.OnUnloading += SessionUnloading;
MySession.OnUnloaded += SessionUnloaded;
if (Torch.Config.UgcServiceType == UGCServiceType.Steam)
_overrideMods.Add(ModCommunication.MOD_ID, ModItemUtils.Create(ModCommunication.MOD_ID));
}

View File

@@ -23,19 +23,19 @@
<Import Project="..\Torch.Mod\Torch.Mod.projitems" Label="Shared" />
<ItemGroup>
<PackageReference Include="ControlzEx" Version="5.0.2" />
<PackageReference Include="HarmonyX" Version="2.10.2-prerelease.4" />
<PackageReference Include="ControlzEx" Version="6.0.0" />
<PackageReference Include="HarmonyX" Version="2.10.2-prerelease.6" />
<PackageReference Include="InfoOf.Fody" Version="2.1.1" PrivateAssets="all" />
<PackageReference Include="MahApps.Metro" Version="2.4.9" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageReference Include="MonoModReorg.RuntimeDetour" Version="23.3.22.1" />
<PackageReference Include="NLog" Version="5.1.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.0.0" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="all" />
<PackageReference Include="protobuf-net" Version="3.1.26" />
<PackageReference Include="protobuf-net" Version="3.2.26" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="Torch.SixLabors.ImageSharp" Version="1.0.0-beta6" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.66">
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.124">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>

View File

@@ -5,6 +5,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using NLog;
using Sandbox;
using Sandbox.Game;
@@ -59,6 +60,8 @@ namespace Torch
/// <inheritdoc />
public ITorchConfig Config { get; protected set; }
public abstract IConfiguration Configuration { get; }
/// <inheritdoc />
public SemanticVersioning.Version TorchVersion { get; }
public string InstancePath { get; protected init;}
@@ -114,14 +117,16 @@ namespace Torch
#pragma warning restore CS0618
var sessionManager = new TorchSessionManager(this);
sessionManager.AddFactory((x) => Sync.IsServer ? new ChatManagerServer(this) : new ChatManagerClient(this));
sessionManager.AddFactory((x) => Sync.IsServer ? new CommandManager(this) : null);
sessionManager.AddFactory((x) => new EntityManager(this));
sessionManager.AddFactory(_ => Sync.IsServer ? new ChatManagerServer(this) : new ChatManagerClient(this));
sessionManager.AddFactory(_ => Sync.IsServer ? new CommandManager(this) : null);
sessionManager.AddFactory(_ => new EntityManager(this));
Managers.AddManager(sessionManager);
Managers.AddManager(new PatchManager(this));
Managers.AddManager(new FilesystemManager(this));
#if !DEBUG
Managers.AddManager(new UpdateManager(this));
#endif
Managers.AddManager(new EventManager(this));
#pragma warning disable CS0618
Managers.AddManager(Plugins);
@@ -367,10 +372,10 @@ namespace Torch
/// <inheritdoc />
public virtual void Stop()
{
LogManager.Flush();
Game.SignalStop();
if (!Game.WaitFor(VRageGame.GameState.Stopped))
if (!Game.WaitFor(VRageGame.GameState.Stopped, TimeSpan.FromSeconds(Config.TickTimeout)))
Log.Warn("Failed to wait for the game to be stopped");
LogManager.Flush();
}
/// <inheritdoc />

View File

@@ -8,6 +8,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Havok;
using Microsoft.Extensions.Configuration;
using NLog;
using NLog.Fluent;
using Sandbox;
@@ -30,6 +31,7 @@ using VRage.Dedicated;
using VRage.EOS;
using VRage.FileSystem;
using VRage.Game;
using VRage.Game.ModAPI;
using VRage.Game.ObjectBuilder;
using VRage.Game.SessionComponents;
using VRage.GameServices;
@@ -165,11 +167,14 @@ namespace Torch
_tweakGameSettings();
MyFileSystem.Reset();
MyInitializer.InvokeBeforeRun(_appSteamId, _appName, _userDataPath);
MyInitializer.InvokeBeforeRun(_appSteamId, _appName, MyVRage.Platform.System.GetRootPath(), _userDataPath);
_log.Info("Loading Dedicated Config");
// object created in SpaceEngineersGame.SetupPerGameSettings()
MySandboxGame.ConfigDedicated.Load();
ApplyConfiguration(MySandboxGame.ConfigDedicated);
MyPlatformGameSettings.CONSOLE_COMPATIBLE = MySandboxGame.ConfigDedicated.ConsoleCompatibility;
//Type.GetType("VRage.Steam.MySteamService, VRage.Steam").GetProperty("IsActive").GetSetMethod(true).Invoke(service, new object[] {SteamAPI.Init()});
@@ -193,7 +198,7 @@ namespace Torch
{
service = MyEOSService.Create();
MyEOSService.InitNetworking(dedicated,
MyEOSService.InitNetworking(dedicated, true, //true because using Eos
"Space Engineers",
service,
"xyza7891A4WeGrpP85BTlBa3BSfUEABN",
@@ -225,7 +230,8 @@ namespace Torch
MyGameService.WorkshopService.AddAggregate(MyModIoService.Create(service, "spaceengineers", "264",
"1fb4489996a5e8ffc6ec1135f9985b5b", "331", "f2b64abe55452252b030c48adc0c1f0e",
MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, true));
MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, true, MyPlatformGameSettings.MODIO_PLATFORM,
MyPlatformGameSettings.MODIO_PORTAL));
if (!isEos && !MyGameService.HasGameServer)
{
@@ -300,6 +306,18 @@ namespace Torch
MyGlobalTypeMetadata.Static.Init(false);
}
private void ApplyConfiguration(IMyConfigDedicated dedicated)
{
var config = _torch.Configuration.GetSection("DedicatedServer");
dedicated.ServerPort = config.GetValue("Port", dedicated.ServerPort);
dedicated.ConsoleCompatibility = config.GetValue("ConsoleCompatibility", dedicated.ConsoleCompatibility);
dedicated.IP = config.GetValue("Ip", dedicated.IP);
dedicated.WorldName = config.GetValue("WorldName", dedicated.WorldName);
dedicated.ServerName = config.GetValue("ServerName", dedicated.ServerName);
dedicated.ServerDescription = config.GetValue("ServerDescription", dedicated.ServerDescription);
}
private void Destroy()
{
_game.Dispose();

View File

@@ -4,21 +4,21 @@
"net7.0-windows7.0": {
"ControlzEx": {
"type": "Direct",
"requested": "[5.0.2, )",
"resolved": "5.0.2",
"contentHash": "f724LoDJ36LxaLR62G4ek9ZAJI8BiiYRJJ04furC/qjXSeIwU0qmHFIe19xB1/FwxyZjevdFguEr9ZUjf3dZgw==",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "MEaqj6ienvKR4E7QJ3vwzo2vrdy2Kqw9Z3CudY5iUixR5iMYeLoMlks7EiABsz4WqDsgVLd9u7fixmCOGU+4ow==",
"dependencies": {
"Microsoft.Xaml.Behaviors.Wpf": "1.1.31",
"System.Text.Json": "5.0.1"
"Microsoft.Xaml.Behaviors.Wpf": "1.1.39",
"System.Text.Json": "5.0.2"
}
},
"HarmonyX": {
"type": "Direct",
"requested": "[2.10.2-prerelease.4, )",
"resolved": "2.10.2-prerelease.4",
"contentHash": "M/44/DhSu1WR8gL62aLPGKqAJ0rrgkw38nT3DgEvLAvyIoQLJmL2Jsn4/d4CC0eDT1Vv82cB9Mxgg0sFD3/qrQ==",
"requested": "[2.10.2-prerelease.6, )",
"resolved": "2.10.2-prerelease.6",
"contentHash": "CPCUR/t5AQ5DDs40bTJ5OwUVTCoZONaJGbWKKjAOwg7c7Ct4KEbfybH6T+KvRGVjf5eN1oyGY5BN7EfWxUh9Xg==",
"dependencies": {
"MonoModReorg.RuntimeDetour": "23.3.22.1"
"MonoMod.RuntimeDetour": "25.0.0"
}
},
"InfoOf.Fody": {
@@ -41,46 +41,44 @@
},
"Microsoft.CodeAnalysis.Common": {
"type": "Direct",
"requested": "[4.4.0, )",
"resolved": "4.4.0",
"contentHash": "JfHupS/B7Jb5MZoYkFFABn3mux0wQgxi2D8F/rJYZeRBK2ZOyk7TjQ2Kq9rh6W/DCh0KNbbSbn5qoFar+ueHqw==",
"requested": "[4.6.0, )",
"resolved": "4.6.0",
"contentHash": "N3uLvekc7DjvE1BX8YW7UH7ldjA4ps/Tun2YmOoSIItJrh1gnQIMKUbK1c3uQUx2NHbLibVZI4o/VB9xb4B7tA==",
"dependencies": {
"Microsoft.CodeAnalysis.Analyzers": "3.3.3",
"System.Collections.Immutable": "6.0.0",
"System.Memory": "4.5.5",
"System.Reflection.Metadata": "5.0.0",
"Microsoft.CodeAnalysis.Analyzers": "3.3.4",
"System.Collections.Immutable": "7.0.0",
"System.Reflection.Metadata": "7.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encoding.CodePages": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
"System.Text.Encoding.CodePages": "7.0.0"
}
},
"Microsoft.CodeAnalysis.CSharp": {
"type": "Direct",
"requested": "[4.4.0, )",
"resolved": "4.4.0",
"contentHash": "eD2w0xHRoaqK07hjlOKGR9eLNy3nimiGNeCClNax1NDgS/+DBtBqCjXelOa+TNy99kIB3nHhUqDmr46nDXy/RQ==",
"requested": "[4.6.0, )",
"resolved": "4.6.0",
"contentHash": "9pyFZUN2Lyu3C0Xfs49kezfH+CzQHMibGsQeQPu0P+GWyH2XXDwmyZ6jAaKQGNUXOJfC2OK01hWMJTJY315uDQ==",
"dependencies": {
"Microsoft.CodeAnalysis.Common": "[4.4.0]"
"Microsoft.CodeAnalysis.Common": "[4.6.0]"
}
},
"MonoModReorg.RuntimeDetour": {
"MonoMod.RuntimeDetour": {
"type": "Direct",
"requested": "[23.3.22.1, )",
"resolved": "23.3.22.1",
"contentHash": "cUES3Hi7QJtBNe0qwVdjZOCDkZDaCpdqS6Au0RaCyQ1PDIR4av13E9qBNAEYew46sgPe0fOrU334md6DLDGHlQ==",
"requested": "[25.0.0, )",
"resolved": "25.0.0",
"contentHash": "u+G34uSEjU0+fk4Iz3Mfws/+E4kW460i6fBz1b4L/yxSndfmdKkJ+pYbU9pwh7IUxgk0Ko0+Mx3fSUQPaNk8nA==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoModReorg.Backports": "23.3.22.1",
"MonoModReorg.Core": "23.3.22.1",
"MonoModReorg.ILHelpers": "23.3.22.1",
"MonoModReorg.Utils": "23.3.22.1"
"MonoMod.Backports": "1.0.0",
"MonoMod.Core": "1.0.0",
"MonoMod.ILHelpers": "1.0.0",
"MonoMod.Utils": "25.0.0"
}
},
"NLog": {
"type": "Direct",
"requested": "[5.1.0, )",
"resolved": "5.1.0",
"contentHash": "oW7ekrkRG9okpDMUcEglunWj8Qf2RY8qkgl+/chJoavzg3dbT13y32t19R54FKkmq80fKzw4ZekZkCrRGanKgQ=="
"requested": "[5.2.2, )",
"resolved": "5.2.2",
"contentHash": "r6Q9740g29gTwmTWlsgdIFm0mhNsfNZmbvWKX/Fxmi8X89ZrpUowHM2T2X1lP7RVpND+ef+XnfKL5g6Q1iNGXA=="
},
"PropertyChanged.Fody": {
"type": "Direct",
@@ -93,18 +91,18 @@
},
"protobuf-net": {
"type": "Direct",
"requested": "[3.1.26, )",
"resolved": "3.1.26",
"contentHash": "iy+VROYtWZEqDvkUjS6FfzKZNpWRoVGc5h0cupGQT/37Ox0LxPblRKLnw6V0RT1MPclLo8nZp7E2M0f7PNn/Tw==",
"requested": "[3.2.26, )",
"resolved": "3.2.26",
"contentHash": "zBzBiKs4yP+tzQOsRA5WbI/zayS6eFv8g0KIKNPI7/RUY1nk9Oe+STmtbUYkNUkO3T3SidEoZv+tF1nmgTSutQ==",
"dependencies": {
"protobuf-net.Core": "3.1.26"
"protobuf-net.Core": "3.2.26"
}
},
"SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.202.66, )",
"resolved": "1.202.66",
"contentHash": "VTOwwfTPnov6WWJNrsmB9lWs5s+6XVUXtV8SgLvgJTswK11MTA0e+TZFfZJoSZ1WUsE2dvxlMrNOYJ6aL6j0wA==",
"requested": "[1.202.124, )",
"resolved": "1.202.124",
"contentHash": "xw8mbJI2WwZcfWvgMf6c6E3agcQ/IQVVdnKZljszQBKq0cjhJG06AoonM+MI74CrYMJxf+wnA+4bzCt4mxy/Qg==",
"dependencies": {
"protobuf-net": "1.0.0"
}
@@ -142,51 +140,85 @@
},
"Microsoft.CodeAnalysis.Analyzers": {
"type": "Transitive",
"resolved": "3.3.3",
"contentHash": "j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ=="
"resolved": "3.3.4",
"contentHash": "AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "f34u2eaqIjNO9YLHBz8rozVZ+TcFiFs0F3r7nUJd7FRkVSxk8u4OpoK226mi49MwexHOR2ibP9MFvRUaLilcQQ==",
"dependencies": {
"Microsoft.Extensions.Primitives": "7.0.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "7.0.4",
"contentHash": "8+XPvJnHZsYgHOQlcMuQe7QNF5KdVKHH1F/wW3nd8/u81Gk/XFAYMDP0Lpz18h7/AM95M662vvqMorcYxCBB4w==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.Extensions.FileProviders.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "0pd4/fho0gC12rQswaGQxbU34jOS1TPS8lZPpkFCH68ppQjHNHYle9iRuHeev1LhrJ94YPvzcRd8UmIuFk23Qw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "6.0.0"
}
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "ip8jnL1aPiaPeKINCqaTEbvBFDmVx9dXQEBZ2HOBRXPD1eabGNqP/bKlsIcp7U2lGxiXd5xIhoFcmY8nM4Hdiw=="
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q=="
},
"Microsoft.Xaml.Behaviors.Wpf": {
"type": "Transitive",
"resolved": "1.1.31",
"contentHash": "LZpuf82ACZWldmfMuv3CTUMDh3o0xo0uHUaybR5HgqVLDBJJ9RZLykplQ/bTJd0/VDt3EhD4iDgUgbdIUAM+Kg=="
"resolved": "1.1.39",
"contentHash": "8PZKqw9QOcu42xk8puY4P1+EXHL9YGOR9b7qhaYx5cILHul456H073tj99vyPcCt0W0781T9RwHqkx507ZyUpQ=="
},
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.11.4",
"contentHash": "IC1h5g0NeJGHIUgzM1P82ld57knhP0IcQfrYITDPXlNpMYGUrsG5TxuaWTjaeqDNQMBDNZkB8L0rBnwsY6JHuQ=="
},
"MonoModReorg.Backports": {
"MonoMod.Backports": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "nLx18prtZbS0nVO8YHElP+TUj1kkDswRgQpa9agt3tyNWke9Kqk5lVkGu87Y3cCMhG+m5Ai0ZDH0+V5B6bXF+Q==",
"resolved": "1.0.0",
"contentHash": "J59I4CMe24aCmWboHCDzQIk37kXqHnJH6KQfDGstlznuDni7Lwdd/8CywmEwVXjVEgfs5yQzvOTW3Xg1NH7fDQ==",
"dependencies": {
"MonoModReorg.ILHelpers": "23.3.22.1"
"MonoMod.ILHelpers": "1.0.0"
}
},
"MonoModReorg.Core": {
"MonoMod.Core": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "Q3ZOgm6AOTL0icgcHsT/6mV5kYt6meqX3DEN1p/et5PxJsXUhVkiZfAptp8y/i+cO6HNgkcESpXEQ4jUWVwsDA==",
"resolved": "1.0.0",
"contentHash": "FlzAEa4ujbA1t3rbKxuW3DP36T0/L6k2IP1F4QXM1cOXMJLHm39Azjt98E/9LFRFBWYFdlMUmg+4THLv2xyisA==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoModReorg.Backports": "23.3.22.1",
"MonoModReorg.ILHelpers": "23.3.22.1",
"MonoModReorg.Utils": "23.3.22.1"
"MonoMod.Backports": "1.0.0",
"MonoMod.ILHelpers": "1.0.0",
"MonoMod.Utils": "25.0.0"
}
},
"MonoModReorg.ILHelpers": {
"MonoMod.ILHelpers": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "dHE/3VZtnTUTkQ34j8Gu6CxKes1QDL8tBuF3QElxHHpPl/QabGCK938k47WWRcRBMoP7IAthkn+Bob4H97rBgw=="
"resolved": "1.0.0",
"contentHash": "dTjGA+dYl7W5yQ0oG/Wr57tsa+ueoFUrwPtz9MZF9iheun4n70u7lge52F8UJi9i0zMHRfS2mAY6+nPuRZHQyQ=="
},
"MonoModReorg.Utils": {
"MonoMod.Utils": {
"type": "Transitive",
"resolved": "23.3.22.1",
"contentHash": "q1cX0mbYxdw2WcE/qGBB84lVY/ffobEr46VQFuwGcWhtw6f1Ql1k4TZfs8gebpesSxHnca13grLeVHrUSpy1+g==",
"resolved": "25.0.0",
"contentHash": "E8m0pH3Kact+A2qH+lxMis90K8+ixInwprn0R1nuAMRHfotHUHeYmr304UEPeInSuY3+IlnC+OB8fqbQiTsWlQ==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoModReorg.Backports": "23.3.22.1",
"MonoModReorg.ILHelpers": "23.3.22.1"
"MonoMod.Backports": "1.0.0",
"MonoMod.ILHelpers": "1.0.0"
}
},
"Newtonsoft.Json": {
@@ -196,99 +228,104 @@
},
"NuGet.Commands": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "j3ma45boGZADsHpJcu3Y2yq+n2luicC6ezd61TXTTzbOzA452oAPaSsFGUB1stIsuP/DVoqkTzjHXjaCHuJKPQ==",
"resolved": "6.6.1",
"contentHash": "D1b7gTk1wp7sxscLhS8O/yoErsRVbR4zJvLVD4jo1sgxh42ZOWKpMkhznPUxpvmCxBhw9hAy8/yWrRH91SfdEQ==",
"dependencies": {
"NuGet.Credentials": "6.4.0",
"NuGet.ProjectModel": "6.4.0"
"Microsoft.Extensions.FileProviders.Abstractions": "6.0.0",
"Microsoft.Extensions.FileSystemGlobbing": "6.0.0",
"NuGet.Credentials": "6.6.1",
"NuGet.ProjectModel": "6.6.1"
}
},
"NuGet.Common": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "srECugLk+LB1bXelDCDhHoi6do/EYTXzuntKhjHraS4roVB3NfWohEdCSiAPdpSV9M40Q6jo6MV2Srml9e+jHQ==",
"resolved": "6.6.1",
"contentHash": "hW5NtShErO3qbdkyv7doCRsFNK9Rlcc7mVjYM+hg1sOAWheTh/oo95DzNbsZthiqyHZfaioopfWtzmoxNw9h4g==",
"dependencies": {
"NuGet.Frameworks": "6.4.0"
"NuGet.Frameworks": "6.6.1"
}
},
"NuGet.Configuration": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "vPjauG9AoacEjiZWGIs+d11FCRVmseqAw78FIApfLvZrYMEbbwc9vc0LdC3PpoW5FxYkktyZSiiXVKXGLu+gXw==",
"resolved": "6.6.1",
"contentHash": "9WbK8wgwPfRpSwuG+ZhMshE48qUYvPIw7VNLCncrq/in4vE6SGsuawPSxPJkkLBtcKTGbPMez5JDvUf6vEBgKg==",
"dependencies": {
"NuGet.Common": "6.4.0",
"NuGet.Common": "6.6.1",
"System.Security.Cryptography.ProtectedData": "4.4.0"
}
},
"NuGet.Credentials": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "tebsxclknVz3D4FrvE2MzVcsOyf6PffjGNQ77X9Yvbj9x5YpVWfumVPetqETcdsNEgiN0bBzfMre33lhrY7Itw==",
"resolved": "6.6.1",
"contentHash": "TuOlXcE1ajwdtfnQaUjDv2xO2u/WDS56/b5jHfEBZetKfcpT0W3iNOqInVPO0qxRxXK5/HXUKVr2Pya1LsVVnA==",
"dependencies": {
"NuGet.Protocol": "6.4.0"
"NuGet.Protocol": "6.6.1"
}
},
"NuGet.DependencyResolver.Core": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "AKomZEKuhQlshujuiHbKvwl2cZNGq3SHsXFbpjCfCjMFMLwwA8saJGQQZp1lzsqQWcQWa6hLOcPtm7T3rd0SVg==",
"resolved": "6.6.1",
"contentHash": "K+EXXLU37PBnwLGx6WnVGxlfWYkdedvUUOeDMERXelNgjg20irtKf3hk+wGB7NmxAdNY9/gGcOgSDOV+M0w3Jg==",
"dependencies": {
"NuGet.Configuration": "6.4.0",
"NuGet.LibraryModel": "6.4.0",
"NuGet.Protocol": "6.4.0"
"NuGet.Configuration": "6.6.1",
"NuGet.LibraryModel": "6.6.1",
"NuGet.Protocol": "6.6.1"
}
},
"NuGet.Frameworks": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "qcufbjJIDtyY/Hah7JJfcRVpRYM3scgPqYBnukjO9kfADCFGr2azvVBozuwzljA6w/cR3w8bXLq6vW5xGrsmHw=="
"resolved": "6.6.1",
"contentHash": "iRtDhL0zPqVw037fHEK9bQljTKPuOHhfIkz86/IH2P8eetr910HTTe5G8lJTuzZHh592Ze/sYhh173HIFjPSfg=="
},
"NuGet.LibraryModel": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "K6ROQpWr34Aje81G0HfipiznLTB8vD4BO8sF6FEwx1KjJVdFkSmGZPmAhc6L1vZPs8TKY5BqoH72zG13zVzW2w==",
"resolved": "6.6.1",
"contentHash": "B0KH19sNNUq56YfEozIsIpk8EOyolG0LRT+hqG1/mhuXlQFiP9BgT6pZgwLQVLUl9YBDx3+KWQQbl6pz8Yh/Sw==",
"dependencies": {
"NuGet.Common": "6.4.0",
"NuGet.Versioning": "6.4.0"
"NuGet.Common": "6.6.1",
"NuGet.Versioning": "6.6.1"
}
},
"NuGet.Packaging": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "aR10aYqcUMGC2mwMGH5rls/MGaz3EVH8DKTTHQ/EC91hXNtrCTTAQonaRR+v1EItcoxtQeZ/WQOorv4z270Tgg==",
"resolved": "6.6.1",
"contentHash": "GwhFi2Ep4YzAGQFYz1OsMVNfiJ1M46nyCgHQ7xjJSMvxDYFgodR1RqVugWFMbIUUq6I8iYASwp5lpHXvITeuIQ==",
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"NuGet.Configuration": "6.4.0",
"NuGet.Versioning": "6.4.0",
"NuGet.Configuration": "6.6.1",
"NuGet.Versioning": "6.6.1",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Cryptography.Pkcs": "5.0.0"
}
},
"NuGet.ProjectModel": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "eW9Q7vPk8cpXDd5b+vtIPkl8dSDCPkPJPrjXPTfZGxhstldnhJrj1XPaonsDZLQ24YY7LrYCzC0BiHh3iO5zUA==",
"resolved": "6.6.1",
"contentHash": "CEyRXXvgIoEQBWn3WZupjkIVC6rPcGUAO5p4Gz+fnF8kcefWQOXHfnOE+UKZ0WwAJG5iMWRvXBKAGOuFiFhNpQ==",
"dependencies": {
"NuGet.DependencyResolver.Core": "6.4.0"
"NuGet.DependencyResolver.Core": "6.6.1"
}
},
"NuGet.Protocol": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "KIPjsWP0P3EMsDsXaa6YBCTvYKur/zI0luS1kO5G37ci8mHs2kJFsuG5qaMhGvgyHASu54sxlic1n1oza2Pcbw==",
"resolved": "6.6.1",
"contentHash": "HhKLsK6Q0NNp6qb0T26GLR5gCTRZu+gzqDVK4xqXHZmsolaDVIdIYpn44b2etaVYLzNJCvgRkw+I422u2bIvMw==",
"dependencies": {
"NuGet.Packaging": "6.4.0"
"NuGet.Packaging": "6.6.1"
}
},
"NuGet.Versioning": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "YE8p3TpX4jIw+Gb24maE8YRDoqWA4imLmCbdOj5IvslLrZJXQ8akeFOGOplxICNVevON1g1SFYT2+cq4yy0nQQ=="
"resolved": "6.6.1",
"contentHash": "Wm/AOFICTIrCgbVxv9dNWusraTzcggbo5W4ao7hD8NNVq911an9TGwW+uNuYc8I5PkpTeMuSXneV2u6hbi1P4w=="
},
"protobuf-net.Core": {
"type": "Transitive",
"resolved": "3.1.26",
"contentHash": "fuKoDWgAf5ju+ixbJoasVFhnUaT0oWUgrWh1AZ5D0Y5keKHpA93vQB5g6aQNtB4zgeQ4hGEeh0MY9bIbAUPgEw=="
"resolved": "3.2.26",
"contentHash": "s8oJW9dBVxix4p8uqMbeG++DIGjgzOFAKoP2i5wayeeFOKBqG+cCBO2S/CAC4MAFlb5m1Os2m/miLcqRCgqJ7Q==",
"dependencies": {
"System.Collections.Immutable": "7.0.0"
}
},
"SemanticVersioning": {
"type": "Transitive",
@@ -305,11 +342,8 @@
},
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "7.0.0",
"contentHash": "dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ=="
},
"System.Formats.Asn1": {
"type": "Transitive",
@@ -324,15 +358,13 @@
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
}
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ=="
"resolved": "7.0.0",
"contentHash": "MclTG61lsD9sYdpNz9xsKBzjsmsfCtcMZYXz/IUr2zlhaTaABonlr1ESeompTgM+Xk+IwtGYU7/voh3YWB/fWw==",
"dependencies": {
"System.Collections.Immutable": "7.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
@@ -363,29 +395,22 @@
},
"System.Text.Encoding.CodePages": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "ZFCILZuOvtKPauZ/j/swhvw68ZRi9ATCfvGbk1QfydmcXBkIWecWKn/250UH7rahZ5OoDBaiAudJtPvLwzw85A==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "7.0.0",
"contentHash": "LSyCblMpvOe0N3E+8e0skHcrIhgV2huaNcjUUEa8hRtgEAm36aGkRoC8Jxlb6Ra6GSfF29ftduPNywin8XolzQ=="
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "/UM3UK1dXKl8Ybysg/21gM4S8DJgkR+yLU8JwqCVbuNqQNImelntgYFAN5QxR8sJJ1kMx//hOUdf0lltosi8cQ=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
"resolved": "5.0.2",
"contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ=="
},
"torch.api": {
"type": "Project",
"dependencies": {
"JorgeSerrano.Json.JsonSnakeCaseNamingPolicy": "[0.9.0, )",
"NLog": "[5.1.0, )",
"NuGet.Commands": "[6.4.0, )",
"NuGet.DependencyResolver.Core": "[6.4.0, )",
"Microsoft.Extensions.Configuration.Binder": "[7.0.4, )",
"NLog": "[5.2.2, )",
"NuGet.Commands": "[6.6.1, )",
"NuGet.DependencyResolver.Core": "[6.6.1, )",
"SemanticVersioning": "[2.0.2, )",
"System.Linq.Async": "[6.0.1, )"
}