public override void Entry(IModHelper helper)
        {
            mod = this;
            var harmony = HarmonyInstance.Create(ModManifest.UniqueID);

            try
            {
                harmony.Patch(
                    original: AccessTools.Method(typeof(Tool), "tilesAffected"),
                    prefix: new HarmonyMethod(typeof(ChangedWateringCanAndHoeArea), nameof(TilesAffectedPatch))
                    );
            }
            catch (Exception e)
            {
                ErrorLog("Error while trying to setup required patches:", e);
            }
        }
Exemplo n.º 2
0
        public override void Entry(IModHelper helper)
        {
            mod = this;

            shouldNotPatchReaching = mod.Helper.ModRegistry.IsLoaded("kakashigr.RadioactiveTools");

            if (shouldNotPatchReaching)
            {
                ErrorLog("Disabled Reach Buff in favor of Radioactive Tools");
            }

            var harmony = new Harmony(ModManifest.UniqueID);

            try
            {
                harmony.Patch(
                    original: AccessTools.Method(typeof(Tool), "tilesAffected"),
                    postfix: new HarmonyMethod(typeof(ChangedWateringCanAndHoeArea), nameof(TilesAffectedPatch)));
            }
            catch (Exception e)
            {
                ErrorLog("Error while trying to setup required patches:", e);
            }
        }