Update to Harmony v2

This commit is contained in:
NGnius (Graham) 2020-05-25 16:36:11 -04:00
parent 2bae14c46b
commit 96e7a01087
6 changed files with 18 additions and 12 deletions

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-->

View file

@ -9,7 +9,7 @@ using IllusionPlugin;
using UnityEngine;
using GamecraftModdingAPI;
using GamecraftModdingAPI.Commands;
using Harmony;
using HarmonyLib;
namespace GamecraftScripting
{
@ -21,7 +21,7 @@ namespace GamecraftScripting
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

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;

View file

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

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;

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;