/********* ** Private methods *********/ /**** ** Patches ****/ /// <summary>A method called via Harmony after <see cref="GameLocation.CanPlantSeedsHere"/> or <see cref="GameLocation.CanPlantTreesHere"/>.</summary> /// <param name="__instance">The farm instance.</param> /// <param name="__result">The return value to use for the method.</param> private static void After_CanPlantSeedsOrTreesHere(GameLocation __instance, ref bool __result) { if (LocationPatcher.TryGetConfig(__instance, out PerLocationConfig config) && config.GrowCrops) { __result = true; } }
/// <summary>A method called via Harmony after <see cref="GameLocation.SeedsIgnoreSeasonsHere"/>.</summary> /// <param name="__instance">The farm instance.</param> /// <param name="__result">The return value to use for the method.</param> private static void After_SeedsIgnoreSeasonsHere(GameLocation __instance, ref bool __result) { if (LocationPatcher.TryGetConfig(__instance, out PerLocationConfig config) && config.GrowCrops && config.GrowCropsOutOfSeason) { __result = true; } }