static void Postfix(ref StatDrawEntry __result, Thing thing) { if (!thing.PsiEquipmentTracker()?.IsPsychic ?? true) { return; } __result = new StatDrawEntry(StatCategoryDefOf.BasicsImportant, "Description".Translate(), "", thing.DescriptionFlavor + "PsiTech.PsychicWeaponDesc".Translate(), 99999, null, Dialog_InfoCard.DefsToHyperlinks(thing.def.descriptionHyperlinks)); }
private static StatDrawEntry DescriptionEntry(Thing thing) { return(new StatDrawEntry(StatCategoryDefOf.BasicsImportant, "Description".Translate(), "", thing.DescriptionFlavor, 99999, null, Dialog_InfoCard.DefsToHyperlinks(thing.def.descriptionHyperlinks))); }
private static StatDrawEntry DescriptionEntry(Faction faction) { return(new StatDrawEntry(StatCategoryDefOf.BasicsImportant, "Description".Translate(), "", faction.GetReportText, 99999, null, Dialog_InfoCard.DefsToHyperlinks(faction.def.descriptionHyperlinks))); }
static StatDrawEntry Postfix(StatDrawEntry entry, Thing thing) { ThingWithComps t = thing as ThingWithComps; if (t == null) { return(entry); } IEnumerable <IDefHyperlinkLister> listers = t.Comps().OfType <IDefHyperlinkLister>(); if (listers.Count() == 0) { return(entry); } Traverse.Create(entry).Field <IEnumerable <Dialog_InfoCard.Hyperlink> >("hyperlinks").Value = Dialog_InfoCard.DefsToHyperlinks(listLinks(thing, listers)); return(entry); }