Skip to content

Commit

Permalink
Always send juminos out
Browse files Browse the repository at this point in the history
  • Loading branch information
Smoked-Fish committed Jun 9, 2024
1 parent e824216 commit 3c4ebaf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Framework/Patches/FarmingPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using StardewModdingAPI;
using StardewValley;
using StardewValley.Buildings;
using StardewValley.Locations;
using StardewValley.TerrainFeatures;
using xTile.ObjectModel;
Expand All @@ -24,6 +25,8 @@ public void Apply()
Patch<FruitTree>(PatchType.Postfix, nameof(FruitTree.IsGrowthBlocked), nameof(IsGrowthBlockedPostfix), [typeof(Vector2), typeof(GameLocation)]);
Patch<FruitTree>(PatchType.Postfix, nameof(FruitTree.IsTooCloseToAnotherTree), nameof(IsTooCloseToAnotherTreePostfix), [typeof(Vector2), typeof(GameLocation), typeof(bool)]);
Patch<Tree>(PatchType.Postfix, nameof(Tree.IsGrowthBlockedByNearbyTree), nameof(IsGrowthBlockedByNearbyTreePostfix));

Patch<JunimoHut>(PatchType.Postfix, nameof(JunimoHut.dayUpdate), nameof(DayUpdatePostfix), [typeof(int)]);
}

// Set all tiles as diggable
Expand Down Expand Up @@ -113,5 +116,11 @@ public static void IsGrowthBlockedByNearbyTreePostfix(Tree __instance, ref bool
if (ModEntry.Config.EnableWildTreeTweaks)
__result = false;
}

// Send juminos out even if the farmer isn't there.
private static void DayUpdatePostfix(JunimoHut __instance)
{
__instance.shouldSendOutJunimos.Value = true;
}
}
}

0 comments on commit 3c4ebaf

Please sign in to comment.