public override string GetExplanation() { StringBuilder stringBuilder = new StringBuilder(); foreach (Pawn pawn in AnimalAlertsUtility.SortedAnimalList(AnimalsNeedingRescue)) { stringBuilder.AppendLine($" {pawn.LabelShort} {((pawn.Name != null && !pawn.Name.Numerical) ? "(" + pawn.KindLabel + ")" : "")} {(pawn.HasBondRelation() ? "BondBrackets".Translate() : "")}"); } return(string.Format("AnimalsNeedRescueDesc".Translate(), stringBuilder.ToString())); }
public override string GetExplanation() { StringBuilder stringBuilder = new StringBuilder(); bool amputatable = false; foreach (Pawn pawn in AnimalAlertsUtility.SortedAnimalList(SickAnimals)) { stringBuilder.AppendLine($" {pawn.LabelShort} {((pawn.Name != null && !pawn.Name.Numerical) ? "(" + pawn.KindLabel + ")" : "")} {(pawn.HasBondRelation() ? "BondBrackets".Translate() : "")}"); foreach (Hediff hediff in pawn.health.hediffSet.hediffs) { if (hediff.CurStage != null && hediff.CurStage.lifeThreatening && hediff.Part != null && hediff.Part != pawn.RaceProps.body.corePart) { amputatable = true; break; } } } if (amputatable) { return(string.Format("AnimalsWithLifeThreateningDiseaseAmputationDesc".Translate(), stringBuilder.ToString())); } return(string.Format("AnimalsWithLifeThreateningDiseaseDesc".Translate(), stringBuilder.ToString())); }