Get things building again on modern monodevelop

This commit is contained in:
NGnius (Graham) 2025-01-11 16:16:39 -05:00
parent 2c24d9caf5
commit 817c4b7381
7 changed files with 217 additions and 64 deletions

View file

@ -1,6 +1,6 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio 2012
VisualStudioVersion = 16.0.29609.76 VisualStudioVersion = 16.0.29609.76
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLre", "CLre\CLre.csproj", "{E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLre", "CLre\CLre.csproj", "{E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}"
@ -13,14 +13,14 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution 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.ActiveCfg = Debug|Any CPU
{89B354CF-C654-4E48-8166-5E20BC6E4836}.Debug|Any CPU.Build.0 = 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.ActiveCfg = Release|Any CPU
{89B354CF-C654-4E48-8166-5E20BC6E4836}.Release|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View file

@ -1,4 +1,3 @@
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using GameNetworkLayer.Shared; using GameNetworkLayer.Shared;
using Svelto.Context; using Svelto.Context;
@ -59,7 +58,7 @@ namespace CLre.API.Synergy
App.Client.GameJoin += (_, __) => { MessageSender().Run(); }; App.Client.GameJoin += (_, __) => { MessageSender().Run(); };
} }
public IEnumerator MessageSender() public System.Collections.IEnumerator MessageSender()
{ {
while (!_isRunning) while (!_isRunning)
{ {

View file

@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net472</TargetFramework> <TargetFramework>net472</TargetFramework>
<AssemblyName>CLre</AssemblyName>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>0.0.3</Version> <Version>0.0.3</Version>
<Authors>NGnius</Authors> <Authors>NGnius</Authors>
@ -9,17 +11,37 @@
<PackageProjectUrl>https://git.exmods.org/NGnius/CLre</PackageProjectUrl> <PackageProjectUrl>https://git.exmods.org/NGnius/CLre</PackageProjectUrl>
<NeutralLanguage>en-CA</NeutralLanguage> <NeutralLanguage>en-CA</NeutralLanguage>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ItemGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<PackageReference Include="Lib.Harmony" Version="2.1.1" /> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
</ItemGroup> <ProjectGuid>{E0EEA15D-AB3C-4C73-A000-C49B5AE9EA66}</ProjectGuid>
<OutputType>Library</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="0Harmony">
<HintPath>..\packages\Lib.Harmony.2.3.3\lib\net35\0Harmony.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<!--Start Dependencies--> <!--Start Dependencies-->
<ItemGroup> <ItemGroup>
<Reference Include="Accessibility"> <Reference Include="Accessibility">
@ -76,6 +98,9 @@
<Reference Include="Svelto.Tasks"> <Reference Include="Svelto.Tasks">
<HintPath>..\..\cl\Cardlife_Data\Managed\Svelto.Tasks.dll</HintPath> <HintPath>..\..\cl\Cardlife_Data\Managed\Svelto.Tasks.dll</HintPath>
</Reference> </Reference>
<Reference Include="System">
<HintPath>..\..\cl\Cardlife_Data\Managed\System.dll</HintPath>
</Reference>
<Reference Include="Unity.Postprocessing.Runtime"> <Reference Include="Unity.Postprocessing.Runtime">
<HintPath>..\..\cl\Cardlife_Data\Managed\Unity.Postprocessing.Runtime.dll</HintPath> <HintPath>..\..\cl\Cardlife_Data\Managed\Unity.Postprocessing.Runtime.dll</HintPath>
</Reference> </Reference>
@ -282,5 +307,45 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<!--End Dependencies--> <!--End Dependencies-->
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="CLre.cs" />
<Compile Include="API\App\Client.cs" />
<Compile Include="API\App\ClientEngines.cs" />
<Compile Include="API\App\ClientEventArgs.cs" />
<Compile Include="API\Characters\AccountUtilityPatches.cs" />
<Compile Include="API\Characters\Character.cs" />
<Compile Include="API\Engines\FrontEndEngines.cs" />
<Compile Include="API\Engines\GameEngines.cs" />
<Compile Include="API\Engines\ICLreEngine.cs" />
<Compile Include="API\Synergy\Tweaks\SerializedCLreTerrainModifyRejection.cs" />
<Compile Include="API\Synergy\ClientHandshakeEngine.cs" />
<Compile Include="API\Synergy\ClientMessagingEngine.cs" />
<Compile Include="API\Synergy\Message.cs" />
<Compile Include="API\Synergy\SerializedCLreHandshake.cs" />
<Compile Include="API\Synergy\SerializedCLreMessage.cs" />
<Compile Include="API\Tools\AccessToolsWarnings.cs" />
<Compile Include="API\Tools\NetClientListener.cs" />
<Compile Include="API\Tools\NetClientSender.cs" />
<Compile Include="API\Utility\Logging.cs" />
<Compile Include="API\Utility\Reflection.cs" />
<Compile Include="Fixes\BugfixAttribute.cs" />
<Compile Include="Fixes\ClientDurabilityNodeErrorRemover.cs" />
<Compile Include="Fixes\CooldownCrossSlotSync.cs" />
<Compile Include="Fixes\EnchantmentTableFloatParseFix.cs" />
<Compile Include="Fixes\ExclusionImprovement.cs" />
<Compile Include="Fixes\FloatLanguageFix.cs" />
<Compile Include="Fixes\InitLogSooner.cs" />
<Compile Include="Fixes\InventoryPanelScrollEngineFix.cs" />
<Compile Include="Fixes\MapPinPointsFloatFix.cs" />
<Compile Include="Fixes\MiniScreenEmbiggener.cs" />
<Compile Include="Fixes\OfflineGameTimeSavingFloatFix.cs" />
<Compile Include="Fixes\OfflineSpawnpointSavingFloatFix.cs" />
<Compile Include="Fixes\StartupSpeedup.cs" />
<Compile Include="Fixes\TerrainModifyReset.cs" />
<Compile Include="Fixes\UnderStructureCollider.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

4
CLre/packages.config Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.3.3" targetFramework="net40" />
</packages>

View file

@ -38,23 +38,34 @@ namespace CLre_server.API.Engines
internal static FasterList<ICLreEngine> afterBuildEngines = new FasterList<ICLreEngine>(); internal static FasterList<ICLreEngine> afterBuildEngines = new FasterList<ICLreEngine>();
private delegate IEngine MainGameServer_AddEngine(IEngine engine);
[HarmonyPrefix] [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<MainGameServer_AddEngine>(typeof(GameServer.GameFramework.MainGameServer),
"AddEngine",
//parameters: new [] {typeof(int), typeof(string)},
instance: __instance);
foreach (ICLreEngine e in beforeBuildEngines) foreach (ICLreEngine e in beforeBuildEngines)
{ {
e.entityFactory = ____entityFactory; e.entityFactory = ____entityFactory;
__instance.AddEngine(e);
addEngine(e);
} }
} }
[HarmonyPostfix] [HarmonyPostfix]
public static void AfterMethodCall(GameServer.GameFramework.MainGameServer __instance, IEntityFactory ____entityFactory) public static void AfterMethodCall(GameServer.GameFramework.MainGameServer __instance, IEntityFactory ____entityFactory)
{ {
var addEngine = Utility.Reflection.MethodAsDelegate<MainGameServer_AddEngine>(typeof(GameServer.GameFramework.MainGameServer),
"AddEngine",
//parameters: new [] {typeof(int), typeof(string)},
instance: __instance);
foreach (ICLreEngine e in afterBuildEngines) foreach (ICLreEngine e in afterBuildEngines)
{ {
e.entityFactory = ____entityFactory; e.entityFactory = ____entityFactory;
__instance.AddEngine(e); addEngine(e);
} }
} }
} }

View file

@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net472</TargetFramework> <TargetFramework>net472</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@ -8,18 +9,39 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://git.exmods.org/NGnius/CLre</PackageProjectUrl> <PackageProjectUrl>https://git.exmods.org/NGnius/CLre</PackageProjectUrl>
<NeutralLanguage>en-CA</NeutralLanguage> <NeutralLanguage>en-CA</NeutralLanguage>
<AssemblyName>CLre_server</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{89B354CF-C654-4E48-8166-5E20BC6E4836}</ProjectGuid>
<OutputType>Library</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.1.1" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="0Harmony">
<HintPath>..\packages\Lib.Harmony.2.3.3\lib\net35\0Harmony.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<!--Start Dependencies--> <!--Start Dependencies-->
<ItemGroup> <ItemGroup>
<Reference Include="Accessibility"> <Reference Include="Accessibility">
@ -76,6 +98,9 @@
<Reference Include="Svelto.Tasks"> <Reference Include="Svelto.Tasks">
<HintPath>..\..\cl\CardlifeGameServer_Data\Managed\Svelto.Tasks.dll</HintPath> <HintPath>..\..\cl\CardlifeGameServer_Data\Managed\Svelto.Tasks.dll</HintPath>
</Reference> </Reference>
<Reference Include="System">
<HintPath>..\..\cl\Cardlife_Data\Managed\System.dll</HintPath>
</Reference>
<Reference Include="Unity.Postprocessing.Runtime"> <Reference Include="Unity.Postprocessing.Runtime">
<HintPath>..\..\cl\CardlifeGameServer_Data\Managed\Unity.Postprocessing.Runtime.dll</HintPath> <HintPath>..\..\cl\CardlifeGameServer_Data\Managed\Unity.Postprocessing.Runtime.dll</HintPath>
</Reference> </Reference>
@ -282,11 +307,56 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove="WebStatus\Assets\index.html" /> <!---<None Remove="WebStatus\Assets\index.html" />-->
<EmbeddedResource Include="WebStatus\Assets\index.html" /> <EmbeddedResource Include="WebStatus\Assets\index.html" />
<None Remove="WebStatus\Assets\error404.html" /> <!---<None Remove="WebStatus\Assets\error404.html" />-->
<EmbeddedResource Include="WebStatus\Assets\error404.html" /> <EmbeddedResource Include="WebStatus\Assets\error404.html" />
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<!--End Dependencies--> <!--End Dependencies-->
<ItemGroup>
<Compile Include="API\Config\CLreConfig.cs" />
<Compile Include="API\Engines\ICLreEngine.cs" />
<Compile Include="API\Engines\ServerEngines.cs" />
<Compile Include="API\MainServer\ModerationEngine.cs" />
<Compile Include="API\MainServer\Moderator.cs" />
<Compile Include="API\MainServer\Server.cs" />
<Compile Include="API\MainServer\ServerEngines.cs" />
<Compile Include="API\MainServer\ServerEventArgs.cs" />
<Compile Include="API\MainServer\UserVerification.cs" />
<Compile Include="API\Synergy\Tweaks\SerializedCLreTerrainModifyRejection.cs" />
<Compile Include="API\Synergy\Clients.cs" />
<Compile Include="API\Synergy\CLreEnforcer.cs" />
<Compile Include="API\Synergy\Message.cs" />
<Compile Include="API\Synergy\SerializedCLreHandshake.cs" />
<Compile Include="API\Synergy\SerializedCLreMessage.cs" />
<Compile Include="API\Synergy\ServerHandshakeEngine.cs" />
<Compile Include="API\Synergy\ServerMessagingEngine.cs" />
<Compile Include="API\Tools\AccessToolsWarnings.cs" />
<Compile Include="API\Tools\NetServerListener.cs" />
<Compile Include="API\Tools\NetServerSender.cs" />
<Compile Include="API\Utility\CardLifeUserAuthentication.cs" />
<Compile Include="API\Utility\Logging.cs" />
<Compile Include="API\Utility\Reflection.cs" />
<Compile Include="WebStatus\AssetEndpoints.cs" />
<Compile Include="WebStatus\Attributes.cs" />
<Compile Include="WebStatus\ConfigurationEndpoints.cs" />
<Compile Include="WebStatus\DebugEndpoints.cs" />
<Compile Include="WebStatus\LogEndpoints.cs" />
<Compile Include="WebStatus\StatusEndpoints.cs" />
<Compile Include="WebStatus\WebServer.cs" />
<Compile Include="CLre_server.cs" />
<Compile Include="Fixes\BugfixAttribute.cs" />
<Compile Include="Fixes\InitLogSooner.cs" />
<Compile Include="Tweaks\Chat\Attributes.cs" />
<Compile Include="Tweaks\Chat\AuthenticationEngine.cs" />
<Compile Include="Tweaks\Chat\ChatConfig.cs" />
<Compile Include="Tweaks\Chat\ChatConnectionEngine.cs" />
<Compile Include="Tweaks\Chat\ChatHandler.cs" />
<Compile Include="Tweaks\Chat\ChatListener.cs" />
<Compile Include="Tweaks\Chat\ModeratorCommands.cs" />
<Compile Include="Tweaks\Chat\UserCommands.cs" />
<Compile Include="Tweaks\TerrainModificationExclusionZone.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.3.3" targetFramework="net40" />
</packages>