コード例 #1
0
        public static string GetTooltipText(Pawn pawn)
        {
            Hediff_Pregnant pregnantHediff    = PawnColumnWorker_Pregnant.GetPregnantHediff(pawn);
            float           gestationProgress = pregnantHediff.GestationProgress;
            int             num      = (int)(pawn.RaceProps.gestationPeriodDays * 60000f);
            int             numTicks = (int)(gestationProgress * (float)num);

            return("PregnantIconDesc".Translate(numTicks.ToStringTicksToDays("F0"), num.ToStringTicksToDays("F0")));
        }
コード例 #2
0
        protected override Texture2D GetIconFor(Pawn pawn)
        {
            Hediff_Pregnant pregnantHediff = PawnColumnWorker_Pregnant.GetPregnantHediff(pawn);

            return((pregnantHediff == null) ? null : PawnColumnWorker_Pregnant.Icon);
        }