public static List <Pair <Pair <ThingDef, string>, List <Pair <RecipeDef, string> > > > GetIndirectUnlocks(this ResearchProjectDef research, bool dedupe = true) { return(research.GetIndirectRecipesUnlocked() .Select(d => new Pair <Pair <ThingDef, string>, List <Pair <RecipeDef, string> > > (new Pair <ThingDef, string>(d.First, ResourceBank.String.AllowsBuildingX(d.First.LabelCap)), //new List<Pair<RecipeDef, string>>() d.Second.Select(rd => new Pair <RecipeDef, string>(rd, ResourceBank.String.AllowsBuildingForCraftingX(rd.LabelCap))).ToList() )).ToList()); }