public override string CompInspectStringExtra() { if (AffixCount > 0) { return ("RimLoot_Affixes".Translate() + ": " + GenText.ToCommaList( AllAffixDefsByAffixes.Select(kv => kv.Value.LabelWithStyle(parent, kv.Key)), false ) ); } return(null); }
// FIXME: Icons on the affix hyperlinks public override IEnumerable <StatDrawEntry> SpecialDisplayStats() { StatCategoryDef category = parent.def.IsApparel ? StatCategoryDefOf.Apparel : parent.def.IsWeapon ? StatCategoryDefOf.Weapon : StatCategoryDefOf.BasicsImportant ; string reportText = "RimLoot_LootAffixDescription".Translate() + "\n\n"; var affixDict = AllAffixDefsByAffixes; foreach (string affixKey in AffixStrings) { LootAffixDef affix = affixDict[affixKey]; reportText += affix.FullStatsReport(parent, affixKey) + "\n"; } if (Prefs.DevMode) { reportText += "[DEV] Affix Rules:\n " + string.Join("\n ", affixRules) + "\n\n"; reportText += "[DEV] Total Points: " + affixes.Select(lad => lad.GetRealAffixCost(parent)).Sum() + "\n " + string.Join("\n ", affixes.Select(lad => AllAffixesByAffixDefs[lad] + ": " + lad.GetRealAffixCost(parent))) + "\n\n" ; } yield return(new StatDrawEntry( category: category, label: "RimLoot_LootAffixModifiers".Translate(), valueString: GenText.ToCommaList( AllAffixDefsByAffixes.Select(kv => kv.Value.LabelWithStyle(parent, kv.Key)), false ), reportText: reportText, hyperlinks: affixes.SelectMany(lad => lad.GetHyperlinks(parent)), displayPriorityWithinCategory: 1 )); // Add any additional entries from the defs or modifiers foreach (string affixKey in AffixStrings) { LootAffixDef affix = affixDict[affixKey]; foreach (var statDrawEntry in affix.SpecialDisplayStatsForThing(parent, affixKey)) { yield return(statDrawEntry); } } }