public static Rect HideFillableBar(Rect rect, float fillPercent, Texture2D fillTex, Texture2D bgTex, bool doBorder)
 {
     if (!BlindResearch.CanSeeProgress(fillPercent))
     {
         fillPercent = 0;
     }
     return(Widgets.FillableBar(rect, fillPercent, fillTex, bgTex, doBorder));
 }
Beispiel #2
0
        public static void Postfix(ResearchManager __instance, bool __state)
        {
            if (!__state && BlindResearch.CanSeeProgress(__instance.currentProj?.ProgressPercent ?? 0))
            {
                RemoveLetter();

                int msg = msgNum++;
                if (msgNum == msgCount)
                {
                    msgNum = 0;
                }
                string letter = "TD.ResearchKnown".Translate(__instance.currentProj.LabelCap);
                string text   = $"TD.ResearchKnownMsg{msg}".Translate(__instance.currentProj.LabelCap) +
                                "\n\n" + "TD.ResearchKnownDesc".Translate() +
                                "\n\n" + __instance.currentProj.LabelCap + ": " + __instance.currentProj.description;

                lastLetter = LetterMaker.MakeLetter(letter, text, LetterDefOf.NeutralEvent);
                Find.LetterStack.ReceiveLetter(lastLetter);
            }
        }
Beispiel #3
0
 public static void Prefix(ResearchManager __instance, ref bool __state)
 {
     __state = BlindResearch.CanSeeProgress(__instance.currentProj?.ProgressPercent ?? 0);
 }