/// <summary> /// This helper function appends the data stored in the genome sequence to the item description in-game. /// </summary> public string CustomDescriptionString(string baseDescription) { StringBuilder builder = new StringBuilder(); if (IsValidTemplate()) { builder.AppendLine(baseDescription); builder.AppendLine(); builder.AppendLine(); builder.AppendLine("QE_GenomeSequencerDescription_Name".Translate() + ": " + sourceName); builder.AppendLine("QE_GenomeSequencerDescription_Race".Translate() + ": " + pawnKindDef.race.LabelCap); builder.AppendLine("QE_GenomeSequencerDescription_Gender".Translate() + ": " + GenderUtility.GetLabel(gender, pawnKindDef.race.race.Animal).CapitalizeFirst()); if (hair != null && hair.texPath != null) { builder.AppendLine("QE_GenomeSequencerDescription_Hair".Translate() + ": " + hair.ToString()); } //Traits if (traits.Count > 0) { builder.AppendLine("QE_GenomeSequencerDescription_Traits".Translate()); foreach (ExposedTraitEntry traitEntry in traits) { builder.AppendLine(" " + traitEntry.def.DataAtDegree(traitEntry.degree).label.CapitalizeFirst()); } } //Hediffs HediffInfo.GenerateDescForHediffList(ref builder, hediffInfos); } else { builder.AppendLine("QE_BlankGenomeTemplateDescription".Translate()); } return(builder.ToString().TrimEndNewlines()); }
//this changes the text displayed in the bottom-left info panel when you select the item public override string GetInspectString() { StringBuilder builder = new StringBuilder(base.GetInspectString()); builder.AppendLine("QE_GenomeSequencerDescription_Race".Translate() + ": " + pawnKindDef.race.LabelCap); builder.AppendLine("QE_GenomeSequencerDescription_Gender".Translate() + ": " + GenderUtility.GetLabel(gender, pawnKindDef.race.race.Animal).CapitalizeFirst()); if (hediffInfos != null) { if (hediffInfos.Count > 0) { builder.AppendLine("QE_GenomeSequencerDescription_Hediffs".Translate() + ": " + hediffInfos.Count); } } return(builder.ToString().TrimEndNewlines()); }
public void drawGender(Rect rect) { var displayedNameArray = Enum.GetValues(typeof(Gender)).Cast <Gender>().ToList().Select((gender) => GenderUtility.GetLabel(gender)).ToArray(); drawButton(rect, GenderUtility.GetLabel(RandomSettings.PawnFilter.Gender), typeof(Gender), displayedNameArray, genderCallback, false); }