//Restore completion letter when there's no queue //DoCompletionLetter should probably go in ResearchPal inside TryStartNext but who wants to transpile that or tell them to fix it //public void FinishProject(ResearchProjectDef proj, bool doCompletionDialog = false, Pawn researcher = null) static void Prefix(ResearchProjectDef proj, bool doCompletionDialog) { if (!doCompletionDialog || !BlindResearch.Active()) { return; } try { DoCompletionDialogEx(proj); } catch (Exception) { } }
public static void Postfix(Rect canvas, bool interactible) { if (BlindResearch.Active() && BlindResearch.CanSeeCurrent()) { Rect iconRect = canvas.ContractedBy(4); iconRect.width = iconRect.height; if (Widgets.ButtonImage(iconRect, ContentFinder <Texture2D> .Get("UI/Designators/Cancel")) && interactible) { Find.ResearchManager.currentProj = null; } } }