public static void BuildMoodThoughtsListString(IEnumerable <Pawn> victims, PawnDiedOrDownedThoughtsKind thoughtsKind, StringBuilder sb, string individualThoughtsHeader, string allColonistsThoughtsHeader, string victimLabelKey)
 {
     foreach (Pawn pawn in victims)
     {
         PawnDiedOrDownedThoughtsUtility.GetThoughts(pawn, null, thoughtsKind, PawnDiedOrDownedThoughtsUtility.tmpIndividualThoughtsToAdd, PawnDiedOrDownedThoughtsUtility.tmpAllColonistsThoughts);
         if (PawnDiedOrDownedThoughtsUtility.tmpIndividualThoughtsToAdd.Any <IndividualThoughtToAdd>() || PawnDiedOrDownedThoughtsUtility.tmpAllColonistsThoughts.Any <ThoughtDef>())
         {
             if (sb.Length > 0)
             {
                 sb.AppendLine();
                 sb.AppendLine();
             }
             string text = pawn.KindLabel.CapitalizeFirst() + " " + pawn.LabelShort;
             if (victimLabelKey.NullOrEmpty())
             {
                 sb.Append(text + ":");
             }
             else
             {
                 sb.Append(victimLabelKey.Translate(new object[]
                 {
                     text
                 }));
             }
             PawnDiedOrDownedThoughtsUtility.BuildMoodThoughtsListString(pawn, null, thoughtsKind, sb, individualThoughtsHeader, allColonistsThoughtsHeader);
         }
     }
 }
        public static string GetBanishPawnDialogText(Pawn banishedPawn)
        {
            StringBuilder stringBuilder = new StringBuilder();
            bool          flag          = PawnBanishUtility.WouldBeLeftToDie(banishedPawn, banishedPawn.Tile);

            stringBuilder.Append("ConfirmBanishPawnDialog".Translate(banishedPawn.Label));
            if (flag)
            {
                stringBuilder.AppendLine();
                stringBuilder.AppendLine();
                stringBuilder.Append("ConfirmBanishPawnDialog_LeftToDie".Translate(banishedPawn.LabelShort).CapitalizeFirst());
            }
            List <ThingWithComps> list       = (banishedPawn.equipment == null) ? null : banishedPawn.equipment.AllEquipmentListForReading;
            List <Apparel>        list2      = (banishedPawn.apparel == null) ? null : banishedPawn.apparel.WornApparel;
            ThingOwner <Thing>    thingOwner = (banishedPawn.inventory == null || !PawnBanishUtility.WillTakeInventoryIfBanished(banishedPawn)) ? null : banishedPawn.inventory.innerContainer;

            if (!list.NullOrEmpty() || !list2.NullOrEmpty() || !thingOwner.NullOrEmpty())
            {
                stringBuilder.AppendLine();
                stringBuilder.AppendLine();
                stringBuilder.Append("ConfirmBanishPawnDialog_Items".Translate(banishedPawn.LabelShort).CapitalizeFirst().AdjustedFor(banishedPawn));
                stringBuilder.AppendLine();
                if (list != null)
                {
                    for (int i = 0; i < list.Count; i++)
                    {
                        stringBuilder.AppendLine();
                        stringBuilder.Append("  - " + list[i].LabelCap);
                    }
                }
                if (list2 != null)
                {
                    for (int j = 0; j < list2.Count; j++)
                    {
                        stringBuilder.AppendLine();
                        stringBuilder.Append("  - " + list2[j].LabelCap);
                    }
                }
                if (thingOwner != null)
                {
                    for (int k = 0; k < thingOwner.Count; k++)
                    {
                        stringBuilder.AppendLine();
                        stringBuilder.Append("  - " + thingOwner[k].LabelCap);
                    }
                }
            }
            PawnDiedOrDownedThoughtsUtility.BuildMoodThoughtsListString(banishedPawn, null, (PawnDiedOrDownedThoughtsKind)((!flag) ? 1 : 2), stringBuilder, "\n\n" + "ConfirmBanishPawnDialog_IndividualThoughts".Translate(banishedPawn.LabelShort), "\n\n" + "ConfirmBanishPawnDialog_AllColonistsThoughts".Translate());
            return(stringBuilder.ToString());
        }