public static void Postfix(Thing __instance)
        {
            Pawn pawn = (Pawn)__instance;

            if (pawn != null && pawn.def.CanHaveFaction)
            {
                CompCharacterClass characterClassComp = pawn.GetComp <CompCharacterClass>();

                if (characterClassComp != null)
                {
                    characterClassComp.SelectCharacterClass();
                }
            }
        }
예제 #2
0
        public static float DrawBirthSignTab(Rect rect, Pawn pawn, float curY)
        {
            CompCharacterClass characterClassComp = pawn.GetComp <CompCharacterClass>();

            // BirthSignComp

            curY       += 4f;
            Text.Font   = GameFont.Tiny;
            Text.Anchor = TextAnchor.UpperLeft;
            GUI.color   = new Color(0.9f, 0.9f, 0.9f);

            Rect birthSignNameRect = new Rect(0f, curY, rect.width, 34f);

            Widgets.Label(birthSignNameRect, "BirthSignNameHere");

            Text.Font = GameFont.Small;
            GUI.color = Color.white;
            curY     += 34f;

            return(curY);
        }
예제 #3
0
        public static float DrawClassSummaryTab(Rect rect, Pawn pawn, float curY)
        {
            CompCharacterClass characterClassComp = pawn.GetComp <CompCharacterClass>();

            curY       += 4f;
            Text.Font   = GameFont.Tiny;
            Text.Anchor = TextAnchor.UpperLeft;
            GUI.color   = new Color(0.9f, 0.9f, 0.9f);

            Rect classNameRect = new Rect(0f, curY, rect.width, 34f);

            Widgets.Label(classNameRect, characterClassComp.classRecord.def.LabelCap);

            /*
             * TooltipHandler.TipRegion(classNameRect, () => characterClassComp.classRecord.def.description, 73412);
             * if (Mouse.IsOver(classNameRect))
             *  Widgets.DrawHighlight(classNameRect);
             */
            Text.Font = GameFont.Small;
            GUI.color = Color.white;
            curY     += 34f;

            return(curY);
        }