namespace Eco.Mods.TechTree { using System; using System.Collections.Generic; using Eco.Gameplay.Components; using Eco.Gameplay.Components.Auth; 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.Math; using Eco.Shared.Networking; using Eco.Shared.Localization; using Eco.Shared.Serialization; using Eco.Shared.Utils; [Serialized] [Weight(10000)] public class SmallWoodCartItem : WorldObjectItem { public override string FriendlyName { get { return "Small Wood Cart"; } } public override string Description { get { return "A tiny cart for tiny things."; } } } [RequiresSkill(typeof(WoodworkingSkill), 1)] public class SmallWoodCartRecipe : Recipe { public SmallWoodCartRecipe() { this.Products = new CraftingElement[] { new CraftingElement(), }; this.Ingredients = new CraftingElement[] { new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), new CraftingElement(typeof(WoodworkingEfficiencySkill), 30, WoodworkingEfficiencySkill.MultiplicativeStrategy), }; this.CraftMinutes = new ConstantValue(2); this.Initialize("Small Wood Cart", typeof(SmallWoodCartRecipe)); CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); } } [Serialized] [RequireComponent(typeof(StandaloneAuthComponent))] [RequireComponent(typeof(PublicStorageComponent))] [RequireComponent(typeof(MovableLinkComponent))] [RequireComponent(typeof(VehicleComponent))] [RequireComponent(typeof(TailingsReportComponent))] public class SmallWoodCartObject : PhysicsWorldObject { private static Dictionary roadEfficiency = new Dictionary() { { typeof(DirtRoadBlock), 1 }, { typeof(DirtRoadWorldObjectBlock), 1 }, { typeof(StoneRoadBlock), 1.4f }, { typeof(StoneRoadWorldObjectBlock), 1.4f }, { typeof(AsphaltRoadBlock), 1.6f }, { typeof(AsphaltRoadWorldObjectBlock), 1.6f } }; public override string FriendlyName { get { return "Small Wood Cart"; } } private SmallWoodCartObject() { } protected override void Initialize() { base.Initialize(); this.GetComponent().Initialize(6, 750000); this.GetComponent().Initialize(8, 1, roadEfficiency); this.GetComponent().HumanPowered(0.5f); } } }