diff --git a/1.4/Assemblies/PerformanceFish.dll b/1.4/Assemblies/PerformanceFish.dll index 2f9de8f..c4e6b8e 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 0c87319..4dcef4f 100644 Binary files a/1.4/Assemblies/PerformanceFish.pdb and b/1.4/Assemblies/PerformanceFish.pdb differ diff --git a/Source/PerformanceFish/JobSystem/DisabledWorkTypesOptimization.cs b/Source/PerformanceFish/JobSystem/DisabledWorkTypesOptimization.cs index 19ba46a..6fdd3e9 100644 --- a/Source/PerformanceFish/JobSystem/DisabledWorkTypesOptimization.cs +++ b/Source/PerformanceFish/JobSystem/DisabledWorkTypesOptimization.cs @@ -17,8 +17,9 @@ public class DisabledWorkTypesOptimization : ClassWithFishPatches = AccessTools.Method(typeof(Pawn), nameof(Pawn.GetDisabledWorkTypes)); [HarmonyPriority(Priority.VeryLow)] - public static bool Prefix(Pawn __instance, bool permanentOnly, out List __result) - => (__result = permanentOnly + public static bool Prefix(Pawn __instance, bool permanentOnly, ref List __result) + => Current.programStateInt != ProgramState.Playing + || (__result = permanentOnly ? __instance.cachedDisabledWorkTypesPermanent : __instance.cachedDisabledWorkTypes) is null; }