From c606ca5ad035d7e61d6b9a00ae88d3c40b1030fb Mon Sep 17 00:00:00 2001 From: StalkR Date: Wed, 27 Dec 2023 23:35:32 +0100 Subject: [PATCH] csproj/sln: turn it into a compilable project --- Properties/AssemblyInfo.cs | 36 +++++++++++++++++++++++ TimeoutFix.cs | 13 +++------ TimeoutFix.csproj | 59 ++++++++++++++++++++++++++++++++++++++ TimeoutFix.sln | 25 ++++++++++++++++ 4 files changed, 124 insertions(+), 9 deletions(-) create mode 100644 Properties/AssemblyInfo.cs create mode 100644 TimeoutFix.csproj create mode 100644 TimeoutFix.sln diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..37cd241 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TimeoutFix")] +[assembly: AssemblyDescription("A plugin to fix the server is not responding error")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TimeoutFix")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("D3C01D03-D271-4840-9C08-A86420E04606")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TimeoutFix.cs b/TimeoutFix.cs index a332b15..96af677 100644 --- a/TimeoutFix.cs +++ b/TimeoutFix.cs @@ -1,12 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; +using System.Diagnostics; using System.Reflection; -using System.Text; using VRage.Plugins; -using System.Threading.Tasks; -using ClientPlugin; using Sandbox.Engine.Multiplayer; using Sandbox.Engine.Networking; using Sandbox.Game; @@ -36,7 +30,8 @@ namespace TimeoutFixPlugin public void Init(object gameInstance) { - MethodUtil.ReplaceMethod(_patch, _target); + // source for MethodUtil not given on the reddit post + //MethodUtil.ReplaceMethod(_patch, _target); } public void Update() @@ -124,7 +119,7 @@ namespace TimeoutFixPlugin } }; - multiplayer.DownloadWorld(); + multiplayer.DownloadWorld(0); } } } diff --git a/TimeoutFix.csproj b/TimeoutFix.csproj new file mode 100644 index 0000000..580fa5b --- /dev/null +++ b/TimeoutFix.csproj @@ -0,0 +1,59 @@ + + + + + Release + AnyCPU + {D3C01D03-D271-4840-9C08-A86420E04606} + Library + Properties + TimeoutFix + TimeoutFix + v4.8 + 512 + true + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x64 + none + true + bin\Release\ + TRACE + prompt + 4 + none + + + + + + + + GameBinaries\Sandbox.Game.dll + + + GameBinaries\Sandbox.Graphics.dll + + + + GameBinaries\VRage.dll + + + GameBinaries\VRage.Game.dll + + + GameBinaries\VRage.Library.dll + + + + \ No newline at end of file diff --git a/TimeoutFix.sln b/TimeoutFix.sln new file mode 100644 index 0000000..cd63ed1 --- /dev/null +++ b/TimeoutFix.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29215.179 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TimeoutFix", "TimeoutFix.csproj", "{D3C01D03-D271-4840-9C08-A86420E04606}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D3C01D03-D271-4840-9C08-A86420E04606}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3C01D03-D271-4840-9C08-A86420E04606}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3C01D03-D271-4840-9C08-A86420E04606}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3C01D03-D271-4840-9C08-A86420E04606}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {363806C1-5B50-4D2A-B17D-8F738ABE3DC1} + EndGlobalSection +EndGlobal