namespace Eco.Mods.TechTree
{
    using System.Collections.Generic;
    using System.Linq;
    using Eco.Gameplay.Components;
    using Eco.Gameplay.DynamicValues;
    using Eco.Gameplay.Items;
    using Eco.Gameplay.Players;
    using Eco.Gameplay.Skills;
    using Eco.Gameplay.Systems.TextLinks;
    using Eco.Mods.TechTree;
    using Eco.Shared.Items;
    using Eco.Shared.Localization;
    using Eco.Shared.Serialization;
    using Eco.Shared.Utils;
    using Eco.Shared.View;
    
    [Serialized]
    [Weight(500)]                                          
    public partial class SpecialtyGrainsItem :
        FoodItem            
    {
        public override string FriendlyName                     { get { return "Specialty Grains"; } }
        public override string Description                      { get { return "Specialty grains, Ground With love."; } }

        private static Nutrients nutrition = new Nutrients()    { Carbs = 8, Fat = 6, Protein = 6, Vitamins = 3};
        public override float Calories                          { get { return 250; } }
        public override Nutrients Nutrition                     { get { return nutrition; } }
    }

    [RequiresSkill(typeof(MillProcessingSkill), 3)]
    public class SpecialtyGrainsRecipe : Recipe
    {
        public SpecialtyGrainsRecipe()
        {
            this.Products = new CraftingElement[]
            {
               new CraftingElement<SpecialtyGrainsItem>(),
            };
            this.Ingredients = new CraftingElement[]
            {
                new CraftingElement<CornItem>(typeof(MillProcessingEfficiencySkill), 10, MillProcessingEfficiencySkill.MultiplicativeStrategy), 
				new CraftingElement<WheatItem>(typeof(MillProcessingEfficiencySkill), 10, MillProcessingEfficiencySkill.MultiplicativeStrategy),
            };
            this.Initialize("Specialty Grains", typeof(SpecialtyGrainsRecipe));
            this.CraftMinutes = CreateCraftTimeValue(typeof(SpecialtyGrainsRecipe), this.UILink(), 5, typeof(MillProcessingSpeedSkill));
            CraftingComponent.AddRecipe(typeof(MillObject), this);
        }
    }
}