/****
        ** Event handlers
        ****/
        /// <summary>The method invoked on the first update tick, once all mods are initialized.</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event data.</param>
        private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
        {
            // init
            CustomChoresApi = Helper.ModRegistry.GetApi <ICustomChoresApi>("furyx639.CustomChores");

            // harmony patches to prevent default chores
            var harmony = HarmonyInstance.Create("furyx639.MarriageDutiesMod");

            harmony.Patch(
                original: AccessTools.Method(typeof(NPC), nameof(NPC.marriageDuties)),
                prefix: new HarmonyMethod(typeof(NpcPatches), nameof(NpcPatches.MarriageDuties_Prefix))
                );
        }
示例#2
0
 /****
 ** Event handlers
 ****/
 /// <summary>The method invoked on the first update tick, once all mods are initialized.</summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event data.</param>
 private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
 {
     // init
     CustomChoresApi = Helper.ModRegistry.GetApi <ICustomChoresApi>("furyx639.CustomChores");
 }