diff --git a/1.3/Assemblies/PerformanceFish.dll b/1.3/Assemblies/PerformanceFish.dll index 9b1618e..e486dda 100644 Binary files a/1.3/Assemblies/PerformanceFish.dll and b/1.3/Assemblies/PerformanceFish.dll differ diff --git a/1.4/Assemblies/PerformanceFish.dll b/1.4/Assemblies/PerformanceFish.dll index 5465586..eec2ce3 100644 Binary files a/1.4/Assemblies/PerformanceFish.dll and b/1.4/Assemblies/PerformanceFish.dll differ diff --git a/Source/PerformanceFish/JobSystem/WorkGiver_MergeOptimization.cs b/Source/PerformanceFish/JobSystem/WorkGiver_MergeOptimization.cs index f80718d..0cd6756 100644 --- a/Source/PerformanceFish/JobSystem/WorkGiver_MergeOptimization.cs +++ b/Source/PerformanceFish/JobSystem/WorkGiver_MergeOptimization.cs @@ -3,6 +3,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. +using Verse.AI; + namespace PerformanceFish.JobSystem; public class WorkGiver_MergeOptimization : ClassWithFishPatches @@ -12,10 +14,15 @@ public class WorkGiver_MergeOptimization : ClassWithFishPatches public override string Description => "Removes mergeables from ListerMergeables if they no longer qualify as mergeable when trying to check for a merging job on them. Vanilla RimWorld just fails and keeps them in"; public override MethodBase TargetMethodInfo => AccessTools.Method(typeof(WorkGiver_Merge), nameof(WorkGiver_Merge.JobOnThing)); - public static void Prefix(Thing t) + public static bool Prefix(Thing t, ref Job? __result) { if (t.GetSlotGroup() is null) + { RemoveFromListerMergeables(t); + __result = null; + return false; + } + return true; } private static void RemoveFromListerMergeables(Thing t)