diff --git a/DunGenPlus/DunGenPlus/DevTools/DevDebugManager.cs b/DunGenPlus/DunGenPlus/DevTools/DevDebugManager.cs index 0c2e466..2717273 100644 --- a/DunGenPlus/DunGenPlus/DevTools/DevDebugManager.cs +++ b/DunGenPlus/DunGenPlus/DevTools/DevDebugManager.cs @@ -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 { diff --git a/DunGenPlus/DunGenPlus/DunGenPlus.csproj b/DunGenPlus/DunGenPlus/DunGenPlus.csproj index e7a3602..ca0ec62 100644 --- a/DunGenPlus/DunGenPlus/DunGenPlus.csproj +++ b/DunGenPlus/DunGenPlus/DunGenPlus.csproj @@ -49,6 +49,13 @@ ..\..\..\Libraries\LethalLevelLoader-publicized.dll + + ..\..\..\Libraries\Mono.Cecil.dll + + + False + ..\..\..\Libraries\MonoMod.Utils.dll + diff --git a/DunGenPlus/DunGenPlus/DunGenPlus/DunGenPlus.dll b/DunGenPlus/DunGenPlus/DunGenPlus/DunGenPlus.dll index 71e8917..0a99fc5 100644 Binary files a/DunGenPlus/DunGenPlus/DunGenPlus/DunGenPlus.dll and b/DunGenPlus/DunGenPlus/DunGenPlus/DunGenPlus.dll differ diff --git a/DunGenPlus/DunGenPlus/Patches/DungeonGeneratorPatch.cs b/DunGenPlus/DunGenPlus/Patches/DungeonGeneratorPatch.cs index 105a821..7a3265b 100644 --- a/DunGenPlus/DunGenPlus/Patches/DungeonGeneratorPatch.cs +++ b/DunGenPlus/DunGenPlus/Patches/DungeonGeneratorPatch.cs @@ -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; } diff --git a/DunGenPlus/DunGenPlus/Plugin.cs b/DunGenPlus/DunGenPlus/Plugin.cs index afa36bd..4ca87fc 100644 --- a/DunGenPlus/DunGenPlus/Plugin.cs +++ b/DunGenPlus/DunGenPlus/Plugin.cs @@ -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);