diff --git a/1.4/Assemblies/0PrepatcherAPI.dll b/1.4/Assemblies/0PrepatcherAPI.dll index 2306a3b..d869ece 100644 Binary files a/1.4/Assemblies/0PrepatcherAPI.dll and b/1.4/Assemblies/0PrepatcherAPI.dll differ diff --git a/1.4/Assemblies/PerformanceFish.dll b/1.4/Assemblies/PerformanceFish.dll index f9f3571..52892d3 100644 Binary files a/1.4/Assemblies/PerformanceFish.dll and b/1.4/Assemblies/PerformanceFish.dll differ diff --git a/1.4/Assemblies/PerformanceFish.pdb b/1.4/Assemblies/PerformanceFish.pdb index e1956e5..a6e4688 100644 Binary files a/1.4/Assemblies/PerformanceFish.pdb and b/1.4/Assemblies/PerformanceFish.pdb differ diff --git a/Source/PerformanceFish/JobSystem/WorkGiver_DoBillOptimization.cs b/Source/PerformanceFish/JobSystem/WorkGiver_DoBillOptimization.cs index 25dc8ee..50a63a5 100644 --- a/Source/PerformanceFish/JobSystem/WorkGiver_DoBillOptimization.cs +++ b/Source/PerformanceFish/JobSystem/WorkGiver_DoBillOptimization.cs @@ -254,12 +254,11 @@ public class WorkGiver_DoBillOptimization : ClassWithFishPatches if (cachedSmallestList.Count != smallestFilter.allowedDefs.Count) { - // Log.Warning($"Cached list count: {cachedSmallestList.Count}, actual filter list count: { - // smallestFilter.allowedDefs.Count}. Forcing a refresh now to fix."); + Log.Warning($"Cached list count: {cachedSmallestList.Count}, actual filter list count: { + smallestFilter.allowedDefs.Count}. Forcing a refresh now to fix."); ThingFilterPatches.ForceSynchronizeCache(smallestFilter); - // Log.Warning($"New cached list count: {cachedSmallestList.Count}, actual filter list count: { - // smallestFilter.allowedDefs.Count}."); - // didn't trigger in 1.3, but now does. Fuck + Log.Warning($"New cached list count: {cachedSmallestList.Count}, actual filter list count: { + smallestFilter.allowedDefs.Count}."); } var smallestListCount = cachedSmallestList.Count; diff --git a/Source/PerformanceFish/ThingFilterPatches.cs b/Source/PerformanceFish/ThingFilterPatches.cs index 55f9df5..32dde8d 100644 --- a/Source/PerformanceFish/ThingFilterPatches.cs +++ b/Source/PerformanceFish/ThingFilterPatches.cs @@ -101,8 +101,12 @@ public class ThingFilterPatches : ClassWithFishPatches = static () => default(ThingFilter)!.CopyAllowancesFrom(null); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Prefix(ThingFilter __instance) - => AllowedDefsListCache.GetAndCheck(__instance).Defs.Clear(); + public static void Prefix(ThingFilter __instance, ThingFilter other) + { + var defs = AllowedDefsListCache.GetAndCheck(__instance).Defs; + defs.Clear(); + defs.AddRange(other.AllowedThingDefs); + } } public class SetAllow_Patch : FishPatch