Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a7ba540fb1 | ||
![]() |
365fcfd2ef | ||
![]() |
9b9d8b7241 | ||
![]() |
ba7ed276e6 | ||
![]() |
08063c4ce8 |
@@ -58,10 +58,10 @@
|
|||||||
},
|
},
|
||||||
"HarmonyX": {
|
"HarmonyX": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.10.2-prerelease.7",
|
"resolved": "2.13.0-torch",
|
||||||
"contentHash": "15kgPt5Cqeu7w1CHp4YqlVXuq6FKZj9iZwA/oNd7SaRVwvq2kZ9EODmJ2+U61ZLFasQY7nr2w/latSAv/Pjn/g==",
|
"contentHash": "ehrCDqzHrNNUlNnRgIys2npuQqbGZ378lixy4pg8/2yQMejctX/p448XTnGGfrCTx6DaHfgQv9Da89JALJgeWA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"MonoMod.RuntimeDetour": "25.1.0-prerelease.1"
|
"MonoMod.RuntimeDetour": "25.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"JetBrains.Annotations": {
|
"JetBrains.Annotations": {
|
||||||
@@ -625,11 +625,10 @@
|
|||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ControlzEx": "[5.0.2, )",
|
"ControlzEx": "[5.0.2, )",
|
||||||
"HarmonyX": "[2.10.2-prerelease.7, )",
|
"HarmonyX": "[2.13.0-torch, )",
|
||||||
"MahApps.Metro": "[2.4.10, )",
|
"MahApps.Metro": "[2.4.10, )",
|
||||||
"Microsoft.CodeAnalysis.CSharp": "[4.11.0, )",
|
"Microsoft.CodeAnalysis.CSharp": "[4.11.0, )",
|
||||||
"Microsoft.CodeAnalysis.Common": "[4.11.0, )",
|
"Microsoft.CodeAnalysis.Common": "[4.11.0, )",
|
||||||
"MonoMod.RuntimeDetour": "[25.1.2, )",
|
|
||||||
"NLog": "[5.3.3, )",
|
"NLog": "[5.3.3, )",
|
||||||
"System.ComponentModel.Annotations": "[5.0.0, )",
|
"System.ComponentModel.Annotations": "[5.0.0, )",
|
||||||
"Torch.API": "[1.0.0, )",
|
"Torch.API": "[1.0.0, )",
|
||||||
|
@@ -128,7 +128,15 @@ namespace Torch.Server.Managers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectWorld(DedicatedConfig.LoadWorld ?? DedicatedConfig.Worlds.First().WorldPath, false);
|
var worldPath = DedicatedConfig.LoadWorld;
|
||||||
|
|
||||||
|
if (worldPath == null)
|
||||||
|
worldPath = DedicatedConfig.Worlds.First().WorldPath;
|
||||||
|
else
|
||||||
|
// make sure we won't end up with a file path when we expect it to be a directory
|
||||||
|
worldPath = Path.EndsInDirectorySeparator(worldPath) ? worldPath : Path.GetDirectoryName(worldPath);
|
||||||
|
|
||||||
|
SelectWorld(worldPath, false);
|
||||||
|
|
||||||
_instanceLoaded?.Invoke(DedicatedConfig);
|
_instanceLoaded?.Invoke(DedicatedConfig);
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@ namespace Torch.Server.Managers
|
|||||||
public static void Patch(PatchContext ctx)
|
public static void Patch(PatchContext ctx)
|
||||||
{
|
{
|
||||||
ctx.GetPattern(typeof(MyDedicatedServerBase).GetMethod(nameof(MyDedicatedServerBase.BanClient))).Prefixes.Add(typeof(MultiplayerManagerDedicatedPatchShim).GetMethod(nameof(BanPrefix)));
|
ctx.GetPattern(typeof(MyDedicatedServerBase).GetMethod(nameof(MyDedicatedServerBase.BanClient))).Prefixes.Add(typeof(MultiplayerManagerDedicatedPatchShim).GetMethod(nameof(BanPrefix)));
|
||||||
ctx.GetPattern(typeof(MyDedicatedServerBase).GetMethod(nameof(MyDedicatedServerBase.KickClient))).Prefixes.Add(typeof(MultiplayerManagerDedicatedPatchShim).GetMethod(nameof(KickPrefix)));
|
ctx.GetPattern(typeof(MyMultiplayerServerBase).GetMethod(nameof(MyMultiplayerServerBase.KickClient))).Prefixes.Add(typeof(MultiplayerManagerDedicatedPatchShim).GetMethod(nameof(KickPrefix)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void BanPrefix(ulong userId, bool banned)
|
public static void BanPrefix(ulong userId, bool banned)
|
||||||
|
@@ -26,10 +26,18 @@ namespace Torch.Patches
|
|||||||
// Reduce response timeout from 100 seconds to 5 seconds.
|
// Reduce response timeout from 100 seconds to 5 seconds.
|
||||||
foreach (var instruction in instructions)
|
foreach (var instruction in instructions)
|
||||||
{
|
{
|
||||||
if (instruction.OpCode == OpCodes.Ldc_I4 && instruction.Operand is MsilOperandInline.MsilOperandInt32 inlineI32 && inlineI32.Value == 1000)
|
if (instruction.OpCode == OpCodes.Ldc_I4 && instruction.Operand is
|
||||||
|
MsilOperandInline.MsilOperandInt32 { Value: 1000 } operandResponseTimeout)
|
||||||
{
|
{
|
||||||
_log.Info("Patching Steam response timeout to 5 seconds");
|
_log.Info("Patching Steam response timeout to 5 seconds");
|
||||||
inlineI32.Value = 50;
|
operandResponseTimeout.Value = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (instruction.OpCode == OpCodes.Ldc_I4 && instruction.Operand is
|
||||||
|
MsilOperandInline.MsilOperandInt32 { Value: 10000 } inlineI32)
|
||||||
|
{
|
||||||
|
_log.Info("Patching Steam connect timeout to 60 seconds");
|
||||||
|
inlineI32.Value = 60000;
|
||||||
}
|
}
|
||||||
|
|
||||||
yield return instruction;
|
yield return instruction;
|
||||||
|
@@ -159,10 +159,10 @@
|
|||||||
},
|
},
|
||||||
"HarmonyX": {
|
"HarmonyX": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.10.2-prerelease.7",
|
"resolved": "2.13.0-torch",
|
||||||
"contentHash": "15kgPt5Cqeu7w1CHp4YqlVXuq6FKZj9iZwA/oNd7SaRVwvq2kZ9EODmJ2+U61ZLFasQY7nr2w/latSAv/Pjn/g==",
|
"contentHash": "ehrCDqzHrNNUlNnRgIys2npuQqbGZ378lixy4pg8/2yQMejctX/p448XTnGGfrCTx6DaHfgQv9Da89JALJgeWA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"MonoMod.RuntimeDetour": "25.1.0-prerelease.1"
|
"MonoMod.RuntimeDetour": "25.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"JetBrains.Annotations": {
|
"JetBrains.Annotations": {
|
||||||
@@ -460,19 +460,8 @@
|
|||||||
},
|
},
|
||||||
"protobuf-net": {
|
"protobuf-net": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "3.2.30",
|
"resolved": "1.0.0",
|
||||||
"contentHash": "C/UTlmxEJHAHpqm8xQK1UyJKaIynVCSNG4mVrbLgnZ7ccH28nN49O8iMJvKEodTgVbnimvy+3mIiAdW6mATwnw==",
|
"contentHash": "kTGOK0E87473sOImOjgZOnz3kTC2aMLffoRWQLYNuBLJnwNNmjanF9IkevZ9Q7yYLeABQfcF3BpeepuMntMVNw=="
|
||||||
"dependencies": {
|
|
||||||
"protobuf-net.Core": "3.2.30"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"protobuf-net.Core": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "3.2.30",
|
|
||||||
"contentHash": "v2ZxxYrz+X212ukSx+uqkLuPu414bvmSAnTyf+PBUKR9ENJxO4P/csorA/27456MCp1JNoMssDj/f91RDiwBfQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"System.Collections.Immutable": "7.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"SemanticVersioning": {
|
"SemanticVersioning": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -576,16 +565,14 @@
|
|||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ControlzEx": "[5.0.2, )",
|
"ControlzEx": "[5.0.2, )",
|
||||||
"HarmonyX": "[2.10.2-prerelease.7, )",
|
"HarmonyX": "[2.13.0-torch, )",
|
||||||
"MahApps.Metro": "[2.4.10, )",
|
"MahApps.Metro": "[2.4.10, )",
|
||||||
"Microsoft.CodeAnalysis.CSharp": "[4.11.0, )",
|
"Microsoft.CodeAnalysis.CSharp": "[4.11.0, )",
|
||||||
"Microsoft.CodeAnalysis.Common": "[4.11.0, )",
|
"Microsoft.CodeAnalysis.Common": "[4.11.0, )",
|
||||||
"MonoMod.RuntimeDetour": "[25.1.2, )",
|
|
||||||
"NLog": "[5.3.3, )",
|
"NLog": "[5.3.3, )",
|
||||||
"System.ComponentModel.Annotations": "[5.0.0, )",
|
"System.ComponentModel.Annotations": "[5.0.0, )",
|
||||||
"Torch.API": "[1.0.0, )",
|
"Torch.API": "[1.0.0, )",
|
||||||
"Torch.SixLabors.ImageSharp": "[1.0.0-beta6, )",
|
"Torch.SixLabors.ImageSharp": "[1.0.0-beta6, )"
|
||||||
"protobuf-net": "[3.2.30, )"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"torch.api": {
|
"torch.api": {
|
||||||
|
@@ -40,10 +40,10 @@
|
|||||||
},
|
},
|
||||||
"HarmonyX": {
|
"HarmonyX": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.10.2-prerelease.7",
|
"resolved": "2.13.0-torch",
|
||||||
"contentHash": "15kgPt5Cqeu7w1CHp4YqlVXuq6FKZj9iZwA/oNd7SaRVwvq2kZ9EODmJ2+U61ZLFasQY7nr2w/latSAv/Pjn/g==",
|
"contentHash": "ehrCDqzHrNNUlNnRgIys2npuQqbGZ378lixy4pg8/2yQMejctX/p448XTnGGfrCTx6DaHfgQv9Da89JALJgeWA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"MonoMod.RuntimeDetour": "25.1.0-prerelease.1"
|
"MonoMod.RuntimeDetour": "25.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"JetBrains.Annotations": {
|
"JetBrains.Annotations": {
|
||||||
@@ -449,11 +449,10 @@
|
|||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ControlzEx": "[5.0.2, )",
|
"ControlzEx": "[5.0.2, )",
|
||||||
"HarmonyX": "[2.10.2-prerelease.7, )",
|
"HarmonyX": "[2.13.0-torch, )",
|
||||||
"MahApps.Metro": "[2.4.10, )",
|
"MahApps.Metro": "[2.4.10, )",
|
||||||
"Microsoft.CodeAnalysis.CSharp": "[4.11.0, )",
|
"Microsoft.CodeAnalysis.CSharp": "[4.11.0, )",
|
||||||
"Microsoft.CodeAnalysis.Common": "[4.11.0, )",
|
"Microsoft.CodeAnalysis.Common": "[4.11.0, )",
|
||||||
"MonoMod.RuntimeDetour": "[25.1.2, )",
|
|
||||||
"NLog": "[5.3.3, )",
|
"NLog": "[5.3.3, )",
|
||||||
"System.ComponentModel.Annotations": "[5.0.0, )",
|
"System.ComponentModel.Annotations": "[5.0.0, )",
|
||||||
"Torch.API": "[1.0.0, )",
|
"Torch.API": "[1.0.0, )",
|
||||||
|
@@ -14,8 +14,7 @@
|
|||||||
<Import Project="..\Torch.Mod\Torch.Mod.projitems" Label="Shared" />
|
<Import Project="..\Torch.Mod\Torch.Mod.projitems" Label="Shared" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.1.2" />
|
<PackageReference Include="HarmonyX" Version="2.13.0-torch" />
|
||||||
<PackageReference Include="HarmonyX" Version="2.10.2-prerelease.7" />
|
|
||||||
|
|
||||||
<PackageReference Include="ControlzEx" Version="5.0.2" />
|
<PackageReference Include="ControlzEx" Version="5.0.2" />
|
||||||
<PackageReference Include="InfoOf.Fody" Version="2.2.0" PrivateAssets="all" />
|
<PackageReference Include="InfoOf.Fody" Version="2.2.0" PrivateAssets="all" />
|
||||||
@@ -24,7 +23,6 @@
|
|||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
|
||||||
<PackageReference Include="NLog" Version="5.3.3" />
|
<PackageReference Include="NLog" Version="5.3.3" />
|
||||||
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="all" />
|
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="all" />
|
||||||
<PackageReference Include="protobuf-net" Version="3.2.30" />
|
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
<PackageReference Include="Torch.SixLabors.ImageSharp" Version="1.0.0-beta6" />
|
<PackageReference Include="Torch.SixLabors.ImageSharp" Version="1.0.0-beta6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@@ -14,11 +14,11 @@
|
|||||||
},
|
},
|
||||||
"HarmonyX": {
|
"HarmonyX": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[2.10.2-prerelease.7, )",
|
"requested": "[2.13.0-torch, )",
|
||||||
"resolved": "2.10.2-prerelease.7",
|
"resolved": "2.13.0-torch",
|
||||||
"contentHash": "15kgPt5Cqeu7w1CHp4YqlVXuq6FKZj9iZwA/oNd7SaRVwvq2kZ9EODmJ2+U61ZLFasQY7nr2w/latSAv/Pjn/g==",
|
"contentHash": "ehrCDqzHrNNUlNnRgIys2npuQqbGZ378lixy4pg8/2yQMejctX/p448XTnGGfrCTx6DaHfgQv9Da89JALJgeWA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"MonoMod.RuntimeDetour": "25.1.0-prerelease.1"
|
"MonoMod.RuntimeDetour": "25.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"InfoOf.Fody": {
|
"InfoOf.Fody": {
|
||||||
@@ -62,19 +62,6 @@
|
|||||||
"System.Reflection.Metadata": "8.0.0"
|
"System.Reflection.Metadata": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"MonoMod.RuntimeDetour": {
|
|
||||||
"type": "Direct",
|
|
||||||
"requested": "[25.1.2, )",
|
|
||||||
"resolved": "25.1.2",
|
|
||||||
"contentHash": "eNf/V6FqS5ErkvdA+vyVM5d7SFeKCkltn5XhT2GrjJ2xec6BG3E7lk/52qVIqDSsMrU+M6dTM8W+fl4IxKQWHw==",
|
|
||||||
"dependencies": {
|
|
||||||
"Mono.Cecil": "0.11.5",
|
|
||||||
"MonoMod.Backports": "1.1.2",
|
|
||||||
"MonoMod.Core": "1.1.2",
|
|
||||||
"MonoMod.ILHelpers": "1.1.0",
|
|
||||||
"MonoMod.Utils": "25.0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"NLog": {
|
"NLog": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[5.3.3, )",
|
"requested": "[5.3.3, )",
|
||||||
@@ -90,15 +77,6 @@
|
|||||||
"Fody": "6.6.4"
|
"Fody": "6.6.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"protobuf-net": {
|
|
||||||
"type": "Direct",
|
|
||||||
"requested": "[3.2.30, )",
|
|
||||||
"resolved": "3.2.30",
|
|
||||||
"contentHash": "C/UTlmxEJHAHpqm8xQK1UyJKaIynVCSNG4mVrbLgnZ7ccH28nN49O8iMJvKEodTgVbnimvy+3mIiAdW6mATwnw==",
|
|
||||||
"dependencies": {
|
|
||||||
"protobuf-net.Core": "3.2.30"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.ComponentModel.Annotations": {
|
"System.ComponentModel.Annotations": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[5.0.0, )",
|
"requested": "[5.0.0, )",
|
||||||
@@ -203,6 +181,18 @@
|
|||||||
"resolved": "1.1.0",
|
"resolved": "1.1.0",
|
||||||
"contentHash": "L2FWjhTrv7tcIxshfZ+M3OcaNr4cNw0IwiVZEgwqRnZ5QAN3+RrNJ8ZwCzwXUWyPDqooJxMcjjg8PsSYUiNBjQ=="
|
"contentHash": "L2FWjhTrv7tcIxshfZ+M3OcaNr4cNw0IwiVZEgwqRnZ5QAN3+RrNJ8ZwCzwXUWyPDqooJxMcjjg8PsSYUiNBjQ=="
|
||||||
},
|
},
|
||||||
|
"MonoMod.RuntimeDetour": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "25.1.2",
|
||||||
|
"contentHash": "eNf/V6FqS5ErkvdA+vyVM5d7SFeKCkltn5XhT2GrjJ2xec6BG3E7lk/52qVIqDSsMrU+M6dTM8W+fl4IxKQWHw==",
|
||||||
|
"dependencies": {
|
||||||
|
"Mono.Cecil": "0.11.5",
|
||||||
|
"MonoMod.Backports": "1.1.2",
|
||||||
|
"MonoMod.Core": "1.1.2",
|
||||||
|
"MonoMod.ILHelpers": "1.1.0",
|
||||||
|
"MonoMod.Utils": "25.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"MonoMod.Utils": {
|
"MonoMod.Utils": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "25.0.6",
|
"resolved": "25.0.6",
|
||||||
@@ -310,13 +300,10 @@
|
|||||||
"resolved": "6.11.0",
|
"resolved": "6.11.0",
|
||||||
"contentHash": "v/GGlIj2dd7svplFmASWEueu62veKW0MrMtBaZ7QG8aJTSGv2yE+pgUGhXRcQ4nxNOEq/wLBrz1vkth/1SND7A=="
|
"contentHash": "v/GGlIj2dd7svplFmASWEueu62veKW0MrMtBaZ7QG8aJTSGv2yE+pgUGhXRcQ4nxNOEq/wLBrz1vkth/1SND7A=="
|
||||||
},
|
},
|
||||||
"protobuf-net.Core": {
|
"protobuf-net": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "3.2.30",
|
"resolved": "1.0.0",
|
||||||
"contentHash": "v2ZxxYrz+X212ukSx+uqkLuPu414bvmSAnTyf+PBUKR9ENJxO4P/csorA/27456MCp1JNoMssDj/f91RDiwBfQ==",
|
"contentHash": "kTGOK0E87473sOImOjgZOnz3kTC2aMLffoRWQLYNuBLJnwNNmjanF9IkevZ9Q7yYLeABQfcF3BpeepuMntMVNw=="
|
||||||
"dependencies": {
|
|
||||||
"System.Collections.Immutable": "7.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"SemanticVersioning": {
|
"SemanticVersioning": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
|
Reference in New Issue
Block a user