Created
August 30, 2019 21:10
-
-
Save ghorsington/31ed685a89df89ab77cd48be8b446c67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Mono.Cecil; | |
| namespace MagicCarrot | |
| { | |
| // Fixes random hangups in Illusion's new game | |
| // Why? I dunno lol | |
| public static class MagicCarrotPatch | |
| { | |
| public static IEnumerable<string> TargetDLLs { get; } = | |
| new[] {"Sirenix.Utilities.dll", "Sirenix.Serialization.dll"}; | |
| public static void Patch(AssemblyDefinition ad) | |
| { | |
| var assemblyUtilities = ad.MainModule.Types.FirstOrDefault(t => t.Name == "AssemblyUtilities"); | |
| var cctor = assemblyUtilities?.Methods.FirstOrDefault(m => m.Name == ".cctor"); | |
| if (cctor == null) | |
| return; | |
| assemblyUtilities.Methods.Remove(cctor); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment