Example #1
0
        private static bool Prefix(ref string __result, RecipeDef r, IngredientCount ing)
        {
            __result = "BillRequiresNutrition"
                       .Translate(ing.GetBaseCount() + BillRequirementsMod.GetMaxAllowedCount(r, ing, true))
                       + " (" + ing.filter.Summary + ")";

            return(false);
        }
Example #2
0
        private static bool Prefix(ref string __result, RecipeDef r, IngredientCount ing)
        {
            if (!ing.filter.AllowedThingDefs.Any(td => td.smallVolume) ||
                ing.filter.AllowedThingDefs.Any(td =>
                                                td.smallVolume && !r.GetPremultipliedSmallIngredients().Contains(td)))
            {
                __result = "BillRequires"
                           .Translate(ing.GetBaseCount(),
                                      ing.filter.Summary + BillRequirementsMod.GetMaxAllowedCount(r, ing, false)
                                      );

                return(false);
            }

            __result = "BillRequires"
                       .Translate(ing.GetBaseCount() * 10f,
                                  ing.filter.Summary + BillRequirementsMod.GetMaxAllowedCount(r, ing, false)
                                  );

            return(false);
        }