namespace Eco.Mods.TechTree
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using Eco.Gameplay.Blocks;
    using Eco.Gameplay.Components;
    using Eco.Gameplay.DynamicValues;
    using Eco.Gameplay.Items;
    using Eco.Gameplay.Objects;
    using Eco.Gameplay.Players;
    using Eco.Gameplay.Skills;
    using Eco.Gameplay.Systems.TextLinks;
    using Eco.Shared.Localization;
    using Eco.Shared.Serialization;
    using Eco.Shared.Utils;
    using Eco.World;
    using Eco.World.Blocks;
    using Eco.Gameplay.Pipes;

    [RequiresSkill(typeof(SteelworkingSkill), 1)]   
    public partial class TiltedCastsRecipe : Recipe
    {
        public TiltedCastsRecipe()
        {
            this.Products = new CraftingElement[]
            {
                new CraftingElement<TiltedCastsItem>(4),          
            };
            this.Ingredients = new CraftingElement[]
            {
                new CraftingElement<SteelItem>(typeof(SteelworkingEfficiencySkill), 10, SteelworkingEfficiencySkill.MultiplicativeStrategy),   
            };
            SkillModifiedValue value = new SkillModifiedValue(45, SteelworkingSpeedSkill.MultiplicativeStrategy, typeof(SteelworkingSpeedSkill), Localizer.Do("craft time"));
            SkillModifiedValueManager.AddBenefitForObject(typeof(TiltedCastsRecipe), Item.Get<TiltedCastsItem>().UILink(), value);
            SkillModifiedValueManager.AddSkillBenefit(Item.Get<TiltedCastsItem>().UILink(), value);
            this.CraftMinutes = value;
            this.Initialize("Tilted Casts", typeof(RollingMillRecipe));

            CraftingComponent.AddRecipe(typeof(RollingMillObject), this);
        }
    }


    [Serialized]
    [Weight(5000)]                 
    public partial class TiltedCastsItem :
    Item                                     
    {
        public override string FriendlyName { get { return "Tilted Casts"; } }
        public override string FriendlyNamePlural { get { return "Tilted Casts"; } } 
        public override string Description { get { return "A very strong building material made from cement and an aggregate like crushed stone."; } }

    }
}