Fixed bug with HarmonyXTranspilerFix
This commit is contained in:
parent
aeae936540
commit
fec9e35898
|
@ -14,6 +14,8 @@ using DunGenPlus.DevTools.Panels;
|
|||
using DunGenPlus.DevTools.UIElements;
|
||||
using DunGenPlus.Generation;
|
||||
using DunGenPlus.DevTools.Panels.Collections;
|
||||
using HarmonyLib;
|
||||
using HarmonyLib.Public.Patching;
|
||||
|
||||
namespace DunGenPlus.DevTools {
|
||||
internal partial class DevDebugManager : MonoBehaviour {
|
||||
|
|
|
@ -49,6 +49,13 @@
|
|||
<Reference Include="LethalLevelLoader-publicized">
|
||||
<HintPath>..\..\..\Libraries\LethalLevelLoader-publicized.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil">
|
||||
<HintPath>..\..\..\Libraries\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoMod.Utils, Version=22.1.29.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Libraries\MonoMod.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
|
Binary file not shown.
|
@ -373,16 +373,17 @@ namespace DunGenPlus.Patches {
|
|||
endSequence.AddBasic(OpCodes.Callvirt);
|
||||
endSequence.AddBasic(OpCodes.Endfinally);
|
||||
|
||||
// WE MUST INJECT BEFORE ENDFINALLY
|
||||
// DiFFoZ says cause try/catch block something
|
||||
// Idk that makes no sense
|
||||
// But if it works it works
|
||||
|
||||
foreach(var instruction in instructions){
|
||||
if (endSequence.VerifyStage(instruction)) {
|
||||
yield return instruction;
|
||||
|
||||
var specialFunction = typeof(DunGenPlusGenerator).GetMethod("AddTileToMainPathDictionary", BindingFlags.Static | BindingFlags.Public);
|
||||
|
||||
yield return new CodeInstruction(OpCodes.Ldloc_0);
|
||||
yield return new CodeInstruction(OpCodes.Call, specialFunction);
|
||||
|
||||
continue;
|
||||
}
|
||||
yield return instruction;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace DunGenPlus {
|
|||
|
||||
internal const string modGUID = "dev.ladyalice.dungenplus";
|
||||
private const string modName = "Dungeon Generation Plus";
|
||||
private const string modVersion = "1.3.1";
|
||||
private const string modVersion = "1.3.3";
|
||||
|
||||
internal readonly Harmony Harmony = new Harmony(modGUID);
|
||||
|
||||
|
|
Loading…
Reference in New Issue