Browse Source

Update to Harmony v2

tags/v0.2.1
NGnius (Graham) 4 years ago
parent
commit
96e7a01087
6 changed files with 18 additions and 12 deletions
  1. +10
    -4
      GamecraftScripting/GamecraftScripting.csproj
  2. +4
    -4
      GamecraftScripting/Plugin.cs
  3. +1
    -1
      GamecraftScripting/Serialization/DeserializeFromDiskEntitiesEnginePatch.cs
  4. +1
    -1
      GamecraftScripting/Serialization/SaveAndLoadCompositionRootPatch.cs
  5. +1
    -1
      GamecraftScripting/Serialization/SaveGameEnginePatch.cs
  6. +1
    -1
      GamecraftScripting/Serialization/SerializationDescriptorMapPatch.cs

+ 10
- 4
GamecraftScripting/GamecraftScripting.csproj View File

@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>0.1.0.0</Version>
<Version>0.2.1</Version>
<Authors>Exmods</Authors>
<PackageLicenseExpression>GNU General Public Licence 3+</PackageLicenseExpression>
<PackageProjectUrl>https://git.exmods.org/SnakesOnAGame/GamecraftScripting</PackageProjectUrl>
@@ -11,9 +11,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IronPython" Version="2.7.9" />
<PackageReference Include="IronPython.StdLib" Version="2.7.9" />
<PackageReference Include="Lib.Harmony" Version="1.2.0.1" />
<PackageReference Include="IronPython" Version="2.7.10" />
<PackageReference Include="IronPython.StdLib" Version="2.7.10" />
<PackageReference Include="Lib.Harmony" Version="2.0.0.10" />
</ItemGroup>

<!--Start Dependencies-->
@@ -795,6 +795,12 @@
<HintPath>..\..\ref\Gamecraft_Data\Managed\VisualProfiler.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="GamecraftModdingAPI">
<HintPath>..\ref\Plugins\GamecraftModdingAPI.dll</HintPath>
</Reference>
<Reference Include="GamecraftModdingAPI">
<HintPath>..\..\ref\Plugins\GamecraftModdingAPI.dll</HintPath>
</Reference>
</ItemGroup>
<!--End Dependencies-->



+ 4
- 4
GamecraftScripting/Plugin.cs View File

@@ -9,7 +9,7 @@ using IllusionPlugin;
using UnityEngine;
using GamecraftModdingAPI;
using GamecraftModdingAPI.Commands;
using Harmony;
using HarmonyLib;

namespace GamecraftScripting
{
@@ -18,10 +18,10 @@ namespace GamecraftScripting
public string[] Filter { get; } = new string[] { "Gamecraft" };

public string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name;
public string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString();

private HarmonyInstance harmony = null;
private Harmony harmony = null;

public void OnApplicationQuit()
{
@@ -35,7 +35,7 @@ namespace GamecraftScripting
{
Main.Init();
var currentAssembly = Assembly.GetExecutingAssembly();
harmony = HarmonyInstance.Create(currentAssembly.GetName().Name);
harmony = new Harmony(currentAssembly.GetName().Name);
harmony.PatchAll(currentAssembly);
// register development commands
#if DEBUG


+ 1
- 1
GamecraftScripting/Serialization/DeserializeFromDiskEntitiesEnginePatch.cs View File

@@ -1,7 +1,7 @@
using System;
using System.Text;
using System.Reflection;
using Harmony;
using HarmonyLib;
using RobocraftX.Common;
using Svelto.DataStructures;
using Svelto.ECS;


+ 1
- 1
GamecraftScripting/Serialization/SaveAndLoadCompositionRootPatch.cs View File

@@ -1,5 +1,5 @@
using System;
using Harmony;
using HarmonyLib;
using RobocraftX.SaveAndLoad;
using Svelto.ECS;
namespace GamecraftScripting.Serialization


+ 1
- 1
GamecraftScripting/Serialization/SaveGameEnginePatch.cs View File

@@ -1,7 +1,7 @@
using System;
using System.Text;
using System.Reflection;
using Harmony;
using HarmonyLib;
using RobocraftX.Common;
using RobocraftX.SaveAndLoad;
using Svelto.DataStructures;


+ 1
- 1
GamecraftScripting/Serialization/SerializationDescriptorMapPatch.cs View File

@@ -1,6 +1,6 @@
using System;
using System.Reflection;
using Harmony;
using HarmonyLib;
using Svelto.ECS;
using Svelto.ECS.Serialization;
using GamecraftModdingAPI.Utility;