public override string BillRequirementsDescription(RecipeDef r, IngredientCount ing)
 {
     if (ing.filter.AllowedThingDefs.Any((ThingDef td) => td.smallVolume) && !ing.filter.AllowedThingDefs.Any((ThingDef td) => td.smallVolume && !r.GetPremultipliedSmallIngredients().Contains(td)))
     {
         return("BillRequires".Translate((float)(ing.GetBaseCount() * 10.0), ing.filter.Summary));
     }
     return("BillRequires".Translate(ing.GetBaseCount(), ing.filter.Summary));
 }
 public override string ExtraDescriptionLine(RecipeDef r)
 {
     if (r.ingredients.Any((IngredientCount ing) => ing.filter.AllowedThingDefs.Any((ThingDef td) => td.smallVolume && !r.GetPremultipliedSmallIngredients().Contains(td))))
     {
         return("BillRequiresMayVary".Translate(10.ToStringCached()));
     }
     return(null);
 }
Exemple #3
0
        public override string BillRequirementsDescription(RecipeDef r, IngredientCount ing)
        {
            string result;

            if (!ing.filter.AllowedThingDefs.Any((ThingDef td) => td.smallVolume) || ing.filter.AllowedThingDefs.Any((ThingDef td) => td.smallVolume && !r.GetPremultipliedSmallIngredients().Contains(td)))
            {
                result = "BillRequires".Translate(new object[]
                {
                    ing.GetBaseCount(),
                    ing.filter.Summary
                });
            }
            else
            {
                result = "BillRequires".Translate(new object[]
                {
                    ing.GetBaseCount() * 10f,
                    ing.filter.Summary
                });
            }
            return(result);
        }