private static List <object> GetWorkTypeDisableCauses(Pawn pawn, WorkTags workTag)
        {
            List <object> list = new List <object>();

            if (pawn.story != null && pawn.story.childhood != null && (pawn.story.childhood.workDisables & workTag) != 0)
            {
                list.Add(pawn.story.childhood);
            }
            if (pawn.story != null && pawn.story.adulthood != null && (pawn.story.adulthood.workDisables & workTag) != 0)
            {
                list.Add(pawn.story.adulthood);
            }
            if (pawn.health != null && pawn.health.hediffSet != null)
            {
                foreach (Hediff hediff in pawn.health.hediffSet.hediffs)
                {
                    HediffStage curStage = hediff.CurStage;
                    if (curStage != null && (curStage.disabledWorkTags & workTag) != 0)
                    {
                        list.Add(hediff);
                    }
                }
            }
            if (pawn.story.traits != null)
            {
                for (int i = 0; i < pawn.story.traits.allTraits.Count; i++)
                {
                    Trait trait = pawn.story.traits.allTraits[i];
                    if ((trait.def.disabledWorkTags & workTag) != 0)
                    {
                        list.Add(trait);
                    }
                }
            }
            if (pawn.royalty != null)
            {
                foreach (RoyalTitle item in pawn.royalty.AllTitlesForReading)
                {
                    if (item.conceited && (item.def.disabledWorkTags & workTag) != 0)
                    {
                        list.Add(item);
                    }
                }
            }
            foreach (QuestPart_WorkDisabled item2 in QuestUtility.GetWorkDisabledQuestPart(pawn))
            {
                if ((item2.disabledWorkTags & workTag) != 0 && !list.Contains(item2.quest))
                {
                    list.Add(item2.quest);
                }
            }
            return(list);
        }