Fix CopyAllowancesFrom patch for CE Custom Ammo compatibility

Thanks to @Epicguru for spotting the erroneous patch
This commit is contained in:
bradson
2023-12-12 11:39:24 +01:00
parent 3d8c8e4d29
commit 0247ad59a1
5 changed files with 10 additions and 7 deletions
@@ -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;