public static void Postfix(CompUseEffect_FinishRandomResearchProject __instance, Pawn usedBy)
 {
     if (Find.ResearchManager.currentProj == null && CustomStorytellerUtility.AllowedResearchProjectDefs().All((ResearchProjectDef r) => r.IsFinished) &&
         CustomStorytellerUtility.TryGetRandomUnfinishedResearchProject(out ResearchProjectDef research))
     {
         NonPublicMethods.CompUseEffect_FinishRandomResearchProject_FinishInstantly(__instance, research, usedBy);
     }
 }
 public static void Postfix(CompUseEffect_FinishRandomResearchProject __instance, Pawn usedBy)
 {
     // If there's no active research project and all storyteller-permitted research projects have been finished, finish a random project instead (favouring lower tech levels)
     if (Find.ResearchManager.currentProj == null && CustomStorytellerUtility.AllowedResearchProjectDefs().All(r => r.IsFinished) && CustomStorytellerUtility.TryGetRandomUnfinishedResearchProject(out ResearchProjectDef research))
     {
         NonPublicMethods.CompUseEffect_FinishRandomResearchProject_FinishInstantly(__instance, research, usedBy);
     }
 }