/// <summary>Removes LoadAllMods from ModManager and initializates Partiality</summary>
        void BootstrapPartiality()
        {
            var harmony = new Harmony(ID);

            harmony.Patch(AccessTools.Method(typeof(ModManager), nameof(ModManager.LoadAllMods)),
                          prefix: new HarmonyMethod(typeof(PartialityLoader), nameof(PrefixReturnFalse)));

            PartialityManager.CreateInstance();
        }
Example #2
0
        public static void cctor_Object()
        {
            OffsetOfInstanceIDInCPlusPlusObject = -1;

            Debug.Log("Let's hook some code!");
            try {
                PartialityManager.CreateInstance();
            } catch (System.Exception e) {
                Debug.LogError(e);
                File.WriteAllText(Application.dataPath + "/errorPartiality.txt", e.ToString());
            }
        }