Пример #1
0
        // Patches an assembly
        private static void PatchAssembly(Assembly assembly, bool late = false, Type[] ignoreLate = null)
        {
            InternalLogger.HandleThrow(() =>
            {
                if (ignoreLate != null)
                {
                    foreach (Type type in ignoreLate)
                    {
                        harmony.PatchWrapper(type);
                    }
                }

                if (late)
                {
                    harmony.LatePatchAll(assembly);
                }
                else
                {
                    harmony.PatchAll(assembly);
                }
            });

            LOGGER.Log($"- Patched '{assembly.GetName().Name}'");
        }
Пример #2
0
        // Injects Guu into the game
        internal static void InjectGuu()
        {
            EdenHarmony harmony = new EdenHarmony("<internal>Guu");

            harmony.PatchWrapper(typeof(GameContext_Patch));
        }