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 CreamItem :
        FoodItem            
    {
        public override string FriendlyName                     { get { return "Cream"; } }
        public override string Description                      { get { return "Fluffy Cream"; } }

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

    [RequiresSkill(typeof(HomeCookingSkill), 1)] 
    public class CreamRecipe : Recipe
    {
        public CreamRecipe()
        {
            this.Products = new CraftingElement[]
            {
               new CraftingElement<CreamItem>(),
            };
            this.Ingredients = new CraftingElement[]
            {
                new CraftingElement<ButterItem>(typeof(HomeCookingEfficiencySkill), 10, HomeCookingEfficiencySkill.MultiplicativeStrategy),
                new CraftingElement<WholeMealMilkItem>(typeof(HomeCookingEfficiencySkill), 10, HomeCookingEfficiencySkill.MultiplicativeStrategy), 
            };
            this.Initialize("Cream", typeof(CreamRecipe));
            this.CraftMinutes = CreateCraftTimeValue(typeof(CreamRecipe), this.UILink(), 2, typeof(HomeCookingSpeedSkill));
            CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this);
        }
    }
}