From 1df876fcb5f81081842c44f3482a4547cccbb915 Mon Sep 17 00:00:00 2001 From: Miguel Angel Padilla Abrego Date: Fri, 31 May 2024 19:44:37 -0600 Subject: [PATCH] Only Util changes --- BetterJunimos/Patches/JunimoHarvesterPatches.cs | 3 ++- BetterJunimos/Utils/Util.cs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BetterJunimos/Patches/JunimoHarvesterPatches.cs b/BetterJunimos/Patches/JunimoHarvesterPatches.cs index 65f370a..d726294 100644 --- a/BetterJunimos/Patches/JunimoHarvesterPatches.cs +++ b/BetterJunimos/Patches/JunimoHarvesterPatches.cs @@ -246,7 +246,8 @@ __instance.controller.pathToEndPoint is not null && hut.tileX is not null && hut.tileY is not null && __instance.currentLocation is not null && - __instance.currentLocation.IsFarm && ( + //__instance.currentLocation.NameOrUniqueName == hut.GetParentLocation().NameOrUniqueName && + ( Math.Abs(__instance.controller.pathToEndPoint.Last().X - hut.tileX.Value - 1) > radius || Math.Abs(__instance.controller.pathToEndPoint.Last().Y - hut.tileY.Value - 1) > radius ); diff --git a/BetterJunimos/Utils/Util.cs b/BetterJunimos/Utils/Util.cs index a2a4cee..1aba874 100644 --- a/BetterJunimos/Utils/Util.cs +++ b/BetterJunimos/Utils/Util.cs @@ -31,7 +31,9 @@ public class Util { internal static JunimoGreenhouse Greenhouse; public static List GetAllFarms() { - return Game1.locations.Where(loc => loc.IsFarm && loc.IsOutdoors).ToList(); + return Game1.locations + //.Where(loc => loc.IsFarm && loc.IsOutdoors) + .ToList(); } public static int CurrentWorkingRadius {