EcoGSCE-Modpack/AutoGen/Clothing/LightBackpack.cs

57 lines
2.2 KiB
C#

namespace Eco.Mods.TechTree
{
using System.Collections.Generic;
using System.ComponentModel;
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.Mods.TechTree;
using Eco.Shared.Items;
using Eco.Shared.Localization;
using Eco.Shared.Serialization;
using Eco.Shared.Utils;
using Eco.Shared.View;
[Serialized]
[Weight(100)]
public partial class LightBackpackItem :
ClothingItem
{
public override string FriendlyName { get { return "Light Backpack"; } }
public override string Description { get { return "Light Backpack. Increasing Movement Speed by 150% but you just can carry 5KG"; } }
public override string Slot { get { return ClothingSlot.Back; } }
public override bool Starter { get { return false ; } }
private static Dictionary<UserStatType, float> flatStats = new Dictionary<UserStatType, float>()
{
{ UserStatType.MaxCarryWeight, 5000f },
{ UserStatType.MovementSpeed, 1.5f },
};
public override Dictionary<UserStatType, float> GetFlatStats() { return flatStats; }
}
[RequiresSkill(typeof(ClothesmakingSkill), 3)]
public class LightBackpackRecipe : Recipe
{
public LightBackpackRecipe()
{
this.Products = new CraftingElement[]
{
new CraftingElement<LightBackpackItem>(),
};
this.Ingredients = new CraftingElement[]
{
new CraftingElement<ClothItem>(typeof(ClothesmakingEfficiencySkill), 20, ClothesmakingEfficiencySkill.MultiplicativeStrategy),
new CraftingElement<CelluloseFiberItem>(typeof(ClothesmakingEfficiencySkill), 20, ClothesmakingEfficiencySkill.MultiplicativeStrategy),
};
this.CraftMinutes = new ConstantValue(1);
this.Initialize("Light Backpack", typeof(LightBackpackRecipe));
CraftingComponent.AddRecipe(typeof(TailoringTableObject), this);
}
}
}