From 817c4b7381166259f5813b708b822ec47ac6563d Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Sat, 11 Jan 2025 16:16:39 -0500 Subject: [PATCH] Get things building again on modern monodevelop --- CLre.sln | 62 +++++++------- CLre/API/Synergy/ClientMessagingEngine.cs | 3 +- CLre/CLre.csproj | 91 +++++++++++++++++--- CLre/packages.config | 4 + CLre_server/API/Engines/ServerEngines.cs | 17 +++- CLre_server/CLre_server.csproj | 100 ++++++++++++++++++---- CLre_server/packages.config | 4 + 7 files changed, 217 insertions(+), 64 deletions(-) create mode 100644 CLre/packages.config create mode 100644 CLre_server/packages.config diff --git a/CLre.sln b/CLre.sln index 02426c3..b576201 100644 --- a/CLre.sln +++ b/CLre.sln @@ -1,31 +1,31 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29609.76 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLre", "CLre\CLre.csproj", "{E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLre_server", "CLre_server\CLre_server.csproj", "{89B354CF-C654-4E48-8166-5E20BC6E4836}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Release|Any CPU.Build.0 = Release|Any CPU - {89B354CF-C654-4E48-8166-5E20BC6E4836}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89B354CF-C654-4E48-8166-5E20BC6E4836}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89B354CF-C654-4E48-8166-5E20BC6E4836}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89B354CF-C654-4E48-8166-5E20BC6E4836}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {588EB8B7-9ADA-4723-BAC9-04B676A88771} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 16.0.29609.76 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLre", "CLre\CLre.csproj", "{E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLre_server", "CLre_server\CLre_server.csproj", "{89B354CF-C654-4E48-8166-5E20BC6E4836}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {89B354CF-C654-4E48-8166-5E20BC6E4836}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89B354CF-C654-4E48-8166-5E20BC6E4836}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89B354CF-C654-4E48-8166-5E20BC6E4836}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89B354CF-C654-4E48-8166-5E20BC6E4836}.Release|Any CPU.Build.0 = Release|Any CPU + {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {588EB8B7-9ADA-4723-BAC9-04B676A88771} + EndGlobalSection +EndGlobal diff --git a/CLre/API/Synergy/ClientMessagingEngine.cs b/CLre/API/Synergy/ClientMessagingEngine.cs index 1bbb632..a904590 100644 --- a/CLre/API/Synergy/ClientMessagingEngine.cs +++ b/CLre/API/Synergy/ClientMessagingEngine.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Collections.Generic; using GameNetworkLayer.Shared; using Svelto.Context; @@ -59,7 +58,7 @@ namespace CLre.API.Synergy App.Client.GameJoin += (_, __) => { MessageSender().Run(); }; } - public IEnumerator MessageSender() + public System.Collections.IEnumerator MessageSender() { while (!_isRunning) { diff --git a/CLre/CLre.csproj b/CLre/CLre.csproj index 314259a..1b52db9 100644 --- a/CLre/CLre.csproj +++ b/CLre/CLre.csproj @@ -1,7 +1,9 @@ - - + + + net472 + CLre true 0.0.3 NGnius @@ -9,18 +11,38 @@ https://git.exmods.org/NGnius/CLre en-CA - - - - - + + Debug + AnyCPU + {E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66} + Library + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + none + true + bin\Release\ + TRACE + prompt + 4 + + + ..\packages\Lib.Harmony.2.3.3\lib\net35\0Harmony.dll + - - - - + ..\..\cl\Cardlife_Data\Managed\Accessibility.dll @@ -76,6 +98,9 @@ ..\..\cl\Cardlife_Data\Managed\Svelto.Tasks.dll + + ..\..\cl\Cardlife_Data\Managed\System.dll + ..\..\cl\Cardlife_Data\Managed\Unity.Postprocessing.Runtime.dll @@ -281,6 +306,46 @@ ..\..\cl\Cardlife_Data\Managed\IllusionPlugin.dll - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CLre/packages.config b/CLre/packages.config new file mode 100644 index 0000000..2607937 --- /dev/null +++ b/CLre/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/CLre_server/API/Engines/ServerEngines.cs b/CLre_server/API/Engines/ServerEngines.cs index fabc9ed..be6e2ed 100644 --- a/CLre_server/API/Engines/ServerEngines.cs +++ b/CLre_server/API/Engines/ServerEngines.cs @@ -38,23 +38,34 @@ namespace CLre_server.API.Engines internal static FasterList afterBuildEngines = new FasterList(); + private delegate IEngine MainGameServer_AddEngine(IEngine engine); + [HarmonyPrefix] - public static void BeforeMethodCall(GameServer.GameFramework.MainGameServer __instance, IEntityFactory ____entityFactory) + public static void BeforeMethodCall(GameServer.GameFramework.MainGameServer __instance, IEntityFactory ____entityFactory) { + var addEngine = Utility.Reflection.MethodAsDelegate(typeof(GameServer.GameFramework.MainGameServer), + "AddEngine", + //parameters: new [] {typeof(int), typeof(string)}, + instance: __instance); foreach (ICLreEngine e in beforeBuildEngines) { e.entityFactory = ____entityFactory; - __instance.AddEngine(e); + + addEngine(e); } } [HarmonyPostfix] public static void AfterMethodCall(GameServer.GameFramework.MainGameServer __instance, IEntityFactory ____entityFactory) { + var addEngine = Utility.Reflection.MethodAsDelegate(typeof(GameServer.GameFramework.MainGameServer), + "AddEngine", + //parameters: new [] {typeof(int), typeof(string)}, + instance: __instance); foreach (ICLreEngine e in afterBuildEngines) { e.entityFactory = ____entityFactory; - __instance.AddEngine(e); + addEngine(e); } } } diff --git a/CLre_server/CLre_server.csproj b/CLre_server/CLre_server.csproj index d5bc888..1ffcbd3 100644 --- a/CLre_server/CLre_server.csproj +++ b/CLre_server/CLre_server.csproj @@ -1,5 +1,6 @@ - - + + + net472 true @@ -8,19 +9,40 @@ MIT https://git.exmods.org/NGnius/CLre en-CA + CLre_server + + + Debug + AnyCPU + {89B354CF-C654-4E48-8166-5E20BC6E4836} + Library + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + none + true + bin\Release\ + TRACE + prompt + 4 - - - - - + + ..\packages\Lib.Harmony.2.3.3\lib\net35\0Harmony.dll + - - - - + ..\..\cl\CardlifeGameServer_Data\Managed\Accessibility.dll @@ -76,6 +98,9 @@ ..\..\cl\CardlifeGameServer_Data\Managed\Svelto.Tasks.dll + + ..\..\cl\Cardlife_Data\Managed\System.dll + ..\..\cl\CardlifeGameServer_Data\Managed\Unity.Postprocessing.Runtime.dll @@ -282,11 +307,56 @@ - + - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CLre_server/packages.config b/CLre_server/packages.config new file mode 100644 index 0000000..2607937 --- /dev/null +++ b/CLre_server/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file