Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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": {
|
||||||
@@ -576,11 +576,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, )",
|
||||||
|
@@ -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" />
|
||||||
|
@@ -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, )",
|
||||||
@@ -203,6 +190,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",
|
||||||
|
Reference in New Issue
Block a user