diff --git a/AutoGen/Clothing/BasicBackpack.cs b/AutoGen/Clothing/BasicBackpack.cs new file mode 100644 index 0000000..d82306a --- /dev/null +++ b/AutoGen/Clothing/BasicBackpack.cs @@ -0,0 +1,56 @@ +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 BasicBackpackItem : + ClothingItem + { + + public override string FriendlyName { get { return "Basic Backpack"; } } + public override string Description { get { return "Can Carry 10KG more with this one little helper"; } } + public override string Slot { get { return ClothingSlot.Back; } } + public override bool Starter { get { return false ; } } + + private static Dictionary flatStats = new Dictionary() + { + { UserStatType.MaxCarryWeight, 10000f }, + }; +public override Dictionary GetFlatStats() { return flatStats; } + } + + + [RequiresSkill(typeof(ClothesmakingSkill), 1)] + public class BasicBackpackRecipe : Recipe + { + public BasicBackpackRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 4, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 5, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(1); + this.Initialize("Basic Backpack", typeof(BasicBackpackRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Clothing/Bearpack.cs b/AutoGen/Clothing/Bearpack.cs new file mode 100644 index 0000000..27479ba --- /dev/null +++ b/AutoGen/Clothing/Bearpack.cs @@ -0,0 +1,57 @@ +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 BearpackItem : + ClothingItem + { + + public override string FriendlyName { get { return "Bearpack"; } } + public override string Description { get { return "Lets you carry as much as a bear! Not really, but it does help you carry 20KG more."; } } + public override string Slot { get { return ClothingSlot.Back; } } + public override bool Starter { get { return false ; } } + + private static Dictionary flatStats = new Dictionary() + { + { UserStatType.MaxCarryWeight, 20000f }, + }; +public override Dictionary GetFlatStats() { return flatStats; } + } + + + [RequiresSkill(typeof(ClothesmakingSkill), 4)] + public class BearpackRecipe : Recipe + { + public BearpackRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 40, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 30, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 50, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(1); + this.Initialize("Bearpack", typeof(BearpackRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Clothing/BigBackpack.cs b/AutoGen/Clothing/BigBackpack.cs new file mode 100644 index 0000000..70f443e --- /dev/null +++ b/AutoGen/Clothing/BigBackpack.cs @@ -0,0 +1,56 @@ +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 BigBackpackItem : + ClothingItem + { + + public override string FriendlyName { get { return "Big Backpack"; } } + public override string Description { get { return "A normal Backpack. Just... bigger. Let's you carry 15KG more"; } } + public override string Slot { get { return ClothingSlot.Back; } } + public override bool Starter { get { return false ; } } + + private static Dictionary flatStats = new Dictionary() + { + { UserStatType.MaxCarryWeight, 15000f }, + }; +public override Dictionary GetFlatStats() { return flatStats; } + } + + + [RequiresSkill(typeof(ClothesmakingSkill), 2)] + public class BigBackpackRecipe : Recipe + { + public BigBackpackRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 4, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 10, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(1); + this.Initialize("Big Backpack", typeof(BigBackpackRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Clothing/LightBackpack.cs b/AutoGen/Clothing/LightBackpack.cs new file mode 100644 index 0000000..b7a8a44 --- /dev/null +++ b/AutoGen/Clothing/LightBackpack.cs @@ -0,0 +1,57 @@ +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 flatStats = new Dictionary() + { + { UserStatType.MaxCarryWeight, 5000f }, + { UserStatType.MovementSpeed, 1.5f }, + }; +public override Dictionary GetFlatStats() { return flatStats; } + } + + + [RequiresSkill(typeof(ClothesmakingSkill), 3)] + public class LightBackpackRecipe : Recipe + { + public LightBackpackRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 20, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 20, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(1); + this.Initialize("Light Backpack", typeof(LightBackpackRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Clothing/RunningShoes.cs b/AutoGen/Clothing/RunningShoes.cs new file mode 100644 index 0000000..a8948b6 --- /dev/null +++ b/AutoGen/Clothing/RunningShoes.cs @@ -0,0 +1,56 @@ +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 RunningShoesItem : + ClothingItem + { + + public override string FriendlyName { get { return "Running Shoes"; } } + public override string Description { get { return "Running Shoes. Increasing Movement Speed by 70%"; } } + public override string Slot { get { return ClothingSlot.Shoes; } } + public override bool Starter { get { return false ; } } + + private static Dictionary flatStats = new Dictionary() + { + { UserStatType.MovementSpeed, 0.7f }, + }; +public override Dictionary GetFlatStats() { return flatStats; } + } + + + [RequiresSkill(typeof(ClothesmakingSkill), 1)] + public class RunningShoesRecipe : Recipe + { + public RunningShoesRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 10, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 5, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(1); + this.Initialize("Running Shoes", typeof(RunningShoesRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Clothing/WorkBackpack.cs b/AutoGen/Clothing/WorkBackpack.cs new file mode 100644 index 0000000..50d542d --- /dev/null +++ b/AutoGen/Clothing/WorkBackpack.cs @@ -0,0 +1,57 @@ +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 WorkBackpackItem : + ClothingItem + { + + public override string FriendlyName { get { return "Work Backpack"; } } + public override string Description { get { return "Lighter pack that causes lower calorie consumption by -20%. Let's you carry 8KG"; } } + public override string Slot { get { return ClothingSlot.Back; } } + public override bool Starter { get { return false ; } } + + private static Dictionary flatStats = new Dictionary() + { + { UserStatType.MaxCarryWeight, 8000f }, + { UserStatType.CalorieRate, -0.2f }, + }; +public override Dictionary GetFlatStats() { return flatStats; } + } + + + [RequiresSkill(typeof(ClothesmakingSkill), 3)] + public class WorkBackpackRecipe : Recipe + { + public WorkBackpackRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 10, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 20, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(1); + this.Initialize("Work Backpack", typeof(WorkBackpackRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Clothing/WorkBoots.cs b/AutoGen/Clothing/WorkBoots.cs new file mode 100644 index 0000000..eda1475 --- /dev/null +++ b/AutoGen/Clothing/WorkBoots.cs @@ -0,0 +1,56 @@ +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 WorkBootsItem : + ClothingItem + { + + public override string FriendlyName { get { return "Work Boots"; } } + public override string Description { get { return "Sport shoes. Decreasing Calorie Consumption by 15%"; } } + public override string Slot { get { return ClothingSlot.Shoes; } } + public override bool Starter { get { return false ; } } + + private static Dictionary flatStats = new Dictionary() + { + { UserStatType.CalorieRate, -0.15f }, + }; +public override Dictionary GetFlatStats() { return flatStats; } + } + + + [RequiresSkill(typeof(ClothesmakingSkill), 3)] + public class WorkBootsRecipe : Recipe + { + public WorkBootsRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 20, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothesmakingEfficiencySkill), 30, ClothesmakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(1); + this.Initialize("Work Boots", typeof(WorkBootsRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/BaconCheeseBurger.cs b/AutoGen/Food/BaconCheeseBurger.cs new file mode 100644 index 0000000..f1f3e90 --- /dev/null +++ b/AutoGen/Food/BaconCheeseBurger.cs @@ -0,0 +1,54 @@ +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.Localization; + using Eco.Shared.Items; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + + [Serialized] + [Weight(10)] + public partial class BaconCheeseBurgerItem : + FoodItem + { + public override string FriendlyName { get { return "Bacon CheeseBurger"; } } + public override string FriendlyNamePlural { get { return "Bacon CheeseBurger"; } } + public override string Description { get { return "We HAVE the skill to make the best burgers, with the best meat and now.. with CHEESE!"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 20, Fat = 22, Protein = 20, Vitamins = 16}; + public override float Calories { get { return 2100; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + [RequiresSkill(typeof(MolecularGastronomySkill), 4)] + public partial class BaconCheeseBurgerRecipe : Recipe + { + public BaconCheeseBurgerRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 10, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 10, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 5, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(BaconCheeseBurgerRecipe), Item.Get().UILink(), 10, typeof(MolecularGastronomySpeedSkill)); + this.Initialize("Bacon CheeseBurger", typeof(BaconCheeseBurgerRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/BakedSalmon.cs b/AutoGen/Food/BakedSalmon.cs new file mode 100644 index 0000000..5506af2 --- /dev/null +++ b/AutoGen/Food/BakedSalmon.cs @@ -0,0 +1,53 @@ +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.Shared.Localization; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Mods.TechTree; + using Eco.Shared.Items; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + + [Serialized] + [Weight(500)] + public partial class BakedSalmonItem : + FoodItem + { + public override string FriendlyName { get { return "Baked Salmon"; } } + public override string FriendlyNamePlural { get { return "Baked Salmon"; } } + public override string Description { get { return "You ARE cooking this with Salmon....Right?"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 8, Fat = 12, Protein = 18, Vitamins = 8}; + public override float Calories { get { return 1200; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(LeavenedBakingSkill), 4)] + public partial class BakedSalmonRecipe : Recipe + { + public BakedSalmonRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LeavenedBakingEfficiencySkill), 10, LeavenedBakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LeavenedBakingEfficiencySkill), 5, LeavenedBakingEfficiencySkill.MultiplicativeStrategy), + + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(BakedSalmonRecipe), Item.Get().UILink(), 3, typeof(LeavenedBakingSpeedSkill)); + this.Initialize("Baked Salmon", typeof(BakedSalmonRecipe)); + CraftingComponent.AddRecipe(typeof(BakeryOvenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/BurritoSupreme.cs b/AutoGen/Food/BurritoSupreme.cs new file mode 100644 index 0000000..4c04779 --- /dev/null +++ b/AutoGen/Food/BurritoSupreme.cs @@ -0,0 +1,53 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + [Serialized] + [Weight(10)] + public partial class BurritoSupremeItem : + FoodItem + { + public override string FriendlyName { get { return "Burrito Supreme"; } } + public override string FriendlyNamePlural { get { return "Burrito Supreme"; } } + public override string Description { get { return "Tacos may make you run to the Latrine, but this won't, I hope..."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 17, Fat = 28, Protein = 26, Vitamins = 18}; + public override float Calories { get { return 2000; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + [RequiresSkill(typeof(MolecularGastronomySkill), 4)] + public partial class BurritoSupremeRecipe : Recipe + { + public BurritoSupremeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 10, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 5, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(BurritoSupremeRecipe), Item.Get().UILink(), 10, typeof(MolecularGastronomySpeedSkill)); + this.Initialize("Burrito Supreme", typeof(BurritoSupremeRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/Cake.cs b/AutoGen/Food/Cake.cs new file mode 100644 index 0000000..702a893 --- /dev/null +++ b/AutoGen/Food/Cake.cs @@ -0,0 +1,54 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(10)] + public partial class CakeItem : + FoodItem + { + public override string FriendlyName { get { return "Cake"; } } + public override string FriendlyNamePlural { get { return "Cake"; } } + public override string Description { get { return "After all this time, it is STILL a lie."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 19, Fat = 25, Protein = 15, Vitamins = 20}; + public override float Calories { get { return 1800; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + [RequiresSkill(typeof(MolecularGastronomySkill), 3)] + public partial class CakeRecipe : Recipe + { + public CakeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 30, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 10, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 10, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(CakeRecipe), Item.Get().UILink(), 30, typeof(MolecularGastronomySpeedSkill)); + this.Initialize("Cake", typeof(CakeRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/ElkTaco.cs b/AutoGen/Food/ElkTaco.cs new file mode 100644 index 0000000..eedb1a5 --- /dev/null +++ b/AutoGen/Food/ElkTaco.cs @@ -0,0 +1,52 @@ +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(200)] + public partial class ElkTacoItem : + FoodItem + { + public override string FriendlyName { get { return "Elk Cookie Taco"; } } + public override string Description { get { return "A tasty treat made from cookies, corn tortillas and meat.\n\nPart of STC custom ECO tweaks by Atoru"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 12, Fat = 7, Protein = 8, Vitamins = 13}; + public override float Calories { get { return 650; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(CulinaryArtsSkill), 3)] + public partial class ElkTacoRecipe : Recipe + { + public ElkTacoRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 30, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(ElkTacoRecipe), Item.Get().UILink(), 15, typeof(CulinaryArtsSpeedSkill)); + this.Initialize("Elk Cookie Taco", typeof(ElkTacoRecipe)); + CraftingComponent.AddRecipe(typeof(StoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/FishFillet.cs b/AutoGen/Food/FishFillet.cs new file mode 100644 index 0000000..841cf19 --- /dev/null +++ b/AutoGen/Food/FishFillet.cs @@ -0,0 +1,51 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(500)] + public partial class FishFilletItem : + FoodItem + { + public override string FriendlyName { get { return "FishFillet"; } } + public override string Description { get { return "Carefully butchered fish, ready to cook."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 0, Fat = 6, Protein = 4, Vitamins = 0}; + public override float Calories { get { return 600; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(MeatPrepSkill), 3)] + public partial class FishFilletRecipe : Recipe + { + public FishFilletRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MeatPrepEfficiencySkill), 20, MeatPrepEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(FishFilletRecipe), Item.Get().UILink(), 2, typeof(MeatPrepSpeedSkill)); + this.Initialize("Fish Fillet", typeof(FishFilletRecipe)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/FishHeadSoup.cs b/AutoGen/Food/FishHeadSoup.cs new file mode 100644 index 0000000..06b4f94 --- /dev/null +++ b/AutoGen/Food/FishHeadSoup.cs @@ -0,0 +1,52 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(500)] + public partial class FishHeadSoupItem : + FoodItem + { + public override string FriendlyName { get { return "Fish Head Soup"; } } + public override string FriendlyNamePlural { get { return "Fish Head Soup"; } } + public override string Description { get { return "Fish heads, fish heads, rolly polly fish heads!"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 3, Fat = 3, Protein = 12, Vitamins = 6}; + public override float Calories { get { return 800; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(HomeCookingSkill), 3)] + public partial class FishHeadSoupRecipe : Recipe + { + public FishHeadSoupRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 5, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 5, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(FishHeadSoupRecipe), Item.Get().UILink(), 3, typeof(HomeCookingSpeedSkill)); + this.Initialize("Fish Head Soup", typeof(FishHeadSoupRecipe)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/FishTaco.cs b/AutoGen/Food/FishTaco.cs new file mode 100644 index 0000000..4aa8790 --- /dev/null +++ b/AutoGen/Food/FishTaco.cs @@ -0,0 +1,52 @@ +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(200)] + public partial class FishTacoItem : + FoodItem + { + public override string FriendlyName { get { return "Fish Cookie Taco"; } } + public override string Description { get { return "A tasty treat made from cookies, corn tortillas and fish.\n\nPart of STC custom ECO tweaks by Atoru"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 13, Fat = 3, Protein = 10, Vitamins = 14 }; + public override float Calories { get { return 650; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(CulinaryArtsSkill), 4)] + public partial class FishTacoRecipe : Recipe + { + public FishTacoRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 30, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(FishTacoRecipe), Item.Get().UILink(), 15, typeof(CulinaryArtsSpeedSkill)); + this.Initialize("Fish Cookie Taco", typeof(FishTacoRecipe)); + CraftingComponent.AddRecipe(typeof(StoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/Fishsticks.cs b/AutoGen/Food/Fishsticks.cs new file mode 100644 index 0000000..a967cde --- /dev/null +++ b/AutoGen/Food/Fishsticks.cs @@ -0,0 +1,52 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(500)] + public partial class FishsticksItem : + FoodItem + { + public override string FriendlyName { get { return "Fishsticks"; } } + public override string FriendlyNamePlural { get { return "Fishsticks"; } } + public override string Description { get { return "Kanye West still does not understand this."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 10, Fat = 6, Protein = 10, Vitamins = 3}; + public override float Calories { get { return 1000; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(BasicBakingSkill), 2)] + public partial class FishsticksRecipe : Recipe + { + public FishsticksRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicBakingEfficiencySkill), 5, BasicBakingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicBakingEfficiencySkill), 20, BasicBakingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(FishsticksRecipe), Item.Get().UILink(), 3, typeof(BasicBakingSpeedSkill)); + this.Initialize("Fishsticks", typeof(FishsticksRecipe)); + CraftingComponent.AddRecipe(typeof(BakeryOvenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/GrillSalmon.cs b/AutoGen/Food/GrillSalmon.cs new file mode 100644 index 0000000..7b95a88 --- /dev/null +++ b/AutoGen/Food/GrillSalmon.cs @@ -0,0 +1,53 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(500)] + public partial class GrillSalmonItem : + FoodItem + { + public override string FriendlyName { get { return "Grilled Salmon"; } } + public override string FriendlyNamePlural { get { return "Grill Salmon"; } } + public override string Description { get { return "You ARE cooking this with Salmon....Right, Pam?"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 12, Fat = 3, Protein = 4, Vitamins = 8}; + public override float Calories { get { return 1100; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(CampfireCreationsSkill), 4)] + public partial class GrillSalmonRecipe : Recipe + { + public GrillSalmonRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCreationsEfficiencySkill), 10, CampfireCreationsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CampfireCreationsEfficiencySkill), 5, CampfireCreationsEfficiencySkill.MultiplicativeStrategy), + + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(GrillSalmonRecipe), Item.Get().UILink(), 3, typeof(CampfireCreationsSpeedSkill)); + this.Initialize("Grill Salmon", typeof(GrillSalmonRecipe)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/Milk.cs b/AutoGen/Food/Milk.cs new file mode 100644 index 0000000..a80f64e --- /dev/null +++ b/AutoGen/Food/Milk.cs @@ -0,0 +1,51 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(10)] + public partial class MilkItem : + FoodItem + { + public override string FriendlyName { get { return "Milk"; } } + public override string FriendlyNamePlural { get { return "Milk"; } } + public override string Description { get { return "Milk, although maybe not from an animal."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 3, Fat = 7, Protein = 10, Vitamins = 0}; + public override float Calories { get { return 120; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + [RequiresSkill(typeof(MolecularGastronomySkill), 2)] + public partial class MilkRecipe : Recipe + { + public MilkRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 24, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(MilkRecipe), Item.Get().UILink(), 10, typeof(MolecularGastronomySpeedSkill)); + this.Initialize("Soy Milk", typeof(MilkRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/ModTest.cs b/AutoGen/Food/ModTest.cs new file mode 100644 index 0000000..e2dbb42 --- /dev/null +++ b/AutoGen/Food/ModTest.cs @@ -0,0 +1,55 @@ +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(5)] + public partial class ModTestItem : + FoodItem + { + public override string FriendlyName { get { return "ModTest"; } } //Name des Produkts + public override string Description { get { return "Ich teste neue Nahrungsoptionen"; } } //Beschreibung des Produkts + + private static Nutrients nutrition = new Nutrients() { Carbs = 25, Fat = 25, Protein = 25, Vitamins = 25}; //Selbsterklärend + public override float Calories { get { return 500; } } //Siehe eine Zeile weiter oben + public override Nutrients Nutrition { get { return nutrition; } } + } + + //[RequiresSkill(typeof(CulinaryArtsSkill), 2)] <- Skill muss gelernt sein zum herstellen + //Recipe muss Umbenannt werden + public partial class ModTestRecipe : Recipe + { + public ModTestRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), //Item das dabei rauskommt brauch einen Namen (auch bei Item.get weiter unten) + + }; + this.Ingredients = new CraftingElement[] + { + // Material das gebraucht wird + Effizienz eines Skills + Anzahl + Anweisung für die Effizienz Berechnung + // new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + }; + //default crafting speed 5 + var craftingspeed = 5.0f; + this.CraftMinutes = CreateCraftTimeValue(typeof(ModTestRecipe), Item.Get().UILink(), craftingspeed, typeof(CulinaryArtsSpeedSkill)); + //Initialize & Serialized muss umbenannt werden + this.Initialize("ModTest", typeof(ModTestRecipe)); + //CraftingComponent.AddRecipe(typeof(KitchenObject), this); Wo das Objekt/Item hergestellt werden soll + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/Oil.cs b/AutoGen/Food/Oil.cs new file mode 100644 index 0000000..2298eae --- /dev/null +++ b/AutoGen/Food/Oil.cs @@ -0,0 +1,162 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(100)] + [Fuel(4000)] + public partial class OilItem : + FoodItem + { + public override string FriendlyName { get { return "Oil"; } } + public override string FriendlyNamePlural { get { return "Oil"; } } + public override string Description { get { return "A plant fat extracted for use in cooking."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 0, Fat = 15, Protein = 0, Vitamins = 0}; + public override float Calories { get { return 120; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(MillProcessingSkill), 2)] + + public partial class OilRecipe : Recipe + { + public OilRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MillProcessingEfficiencySkill), 30, MillProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(OilRecipe), Item.Get().UILink(), 5, typeof(MillProcessingSpeedSkill)); + this.Initialize("Oil", typeof(OilRecipe)); + CraftingComponent.AddRecipe(typeof(MillObject), this); + } + } + public partial class OilRecipe2 : Recipe + { + public OilRecipe2() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MillProcessingEfficiencySkill), 40, MillProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(OilRecipe2), Item.Get().UILink(), 5, typeof(MillProcessingSpeedSkill)); + this.Initialize("Oil from Huckberry Seeds", typeof(OilRecipe2)); + CraftingComponent.AddRecipe(typeof(MillObject), this); + } + } + public partial class OilRecipe3 : Recipe + { + public OilRecipe3() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MillProcessingEfficiencySkill), 40, MillProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(OilRecipe3), Item.Get().UILink(), 5, typeof(MillProcessingSpeedSkill)); + this.Initialize("Oil from Wheat Seeds", typeof(OilRecipe3)); + CraftingComponent.AddRecipe(typeof(MillObject), this); + } + } + public partial class OilRecipe4 : Recipe + { + public OilRecipe4() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MillProcessingEfficiencySkill), 40, MillProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(OilRecipe4), Item.Get().UILink(), 5, typeof(MillProcessingSpeedSkill)); + this.Initialize("Oil from Corn Seeds", typeof(OilRecipe4)); + CraftingComponent.AddRecipe(typeof(MillObject), this); + } + } + public partial class OilRecipe5 : Recipe + { + public OilRecipe5() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MillProcessingEfficiencySkill), 40, MillProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(OilRecipe5), Item.Get().UILink(), 5, typeof(MillProcessingSpeedSkill)); + this.Initialize("Oil from Beet Seeds", typeof(OilRecipe5)); + CraftingComponent.AddRecipe(typeof(MillObject), this); + } + } + public partial class OilRecipe6 : Recipe + { + public OilRecipe6() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MillProcessingEfficiencySkill), 40, MillProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(OilRecipe6), Item.Get().UILink(), 5, typeof(MillProcessingSpeedSkill)); + this.Initialize("Oil from Tomato Seeds", typeof(OilRecipe6)); + CraftingComponent.AddRecipe(typeof(MillObject), this); + } + } + + public partial class OilRecipe7 : Recipe + { + public OilRecipe7() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MillProcessingEfficiencySkill), 40, MillProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(OilRecipe7), Item.Get().UILink(), 5, typeof(MillProcessingSpeedSkill)); + this.Initialize("Oil from Prickly Pear Seed", typeof(OilRecipe7)); + CraftingComponent.AddRecipe(typeof(MillObject), this); + } + } +} diff --git a/AutoGen/Food/RicePilaf.cs b/AutoGen/Food/RicePilaf.cs new file mode 100644 index 0000000..303fbf8 --- /dev/null +++ b/AutoGen/Food/RicePilaf.cs @@ -0,0 +1,52 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(10)] + public partial class RicePilafItem : + FoodItem + { + public override string FriendlyName { get { return "Rice Pilaf"; } } + public override string FriendlyNamePlural { get { return "Rice Pilaf"; } } + public override string Description { get { return "Pilaf is a dish in which rice is cooked in a seasoned broth."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 17, Fat = 13, Protein = 20, Vitamins = 10}; + public override float Calories { get { return 650; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + [RequiresSkill(typeof(MolecularGastronomySkill), 2)] + public partial class RicePilafRecipe : Recipe + { + public RicePilafRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 30, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(RicePilafRecipe), Item.Get().UILink(), 10, typeof(MolecularGastronomySpeedSkill)); + this.Initialize("Rice Pilaf", typeof(RicePilafRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/RicePudding.cs b/AutoGen/Food/RicePudding.cs new file mode 100644 index 0000000..5f40dc4 --- /dev/null +++ b/AutoGen/Food/RicePudding.cs @@ -0,0 +1,51 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + [Serialized] + [Weight(10)] + public partial class RicePuddingItem : + FoodItem + { + public override string FriendlyName { get { return "Rice Pudding"; } } + public override string FriendlyNamePlural { get { return "Rice Pudding"; } } + public override string Description { get { return "Using Rice and Milk, you made Rice Pudding, not some kid's cereal."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 21, Fat = 10, Protein = 17, Vitamins = 10}; + public override float Calories { get { return 500; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + [RequiresSkill(typeof(MolecularGastronomySkill), 1)] + public partial class RicePuddingRecipe : Recipe + { + public RicePuddingRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 10, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(RicePuddingRecipe), Item.Get().UILink(), 5, typeof(MolecularGastronomySpeedSkill)); + this.Initialize("Rice Pudding", typeof(RicePuddingRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/SpicyClamChowder.cs b/AutoGen/Food/SpicyClamChowder.cs new file mode 100644 index 0000000..6cbb983 --- /dev/null +++ b/AutoGen/Food/SpicyClamChowder.cs @@ -0,0 +1,52 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + [Serialized] + [Weight(600)] + public partial class SpicyClamChowderItem : + FoodItem + { + public override string FriendlyName { get { return "Spicy Clam Chowder"; } } + public override string Description { get { return "Spicy!!(also Clam and Chowder)"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 10, Fat = 14, Protein = 15, Vitamins = 18 }; + public override float Calories { get { return 1500; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(CulinaryArtsSkill), 4)] + public partial class SpicyClamChowderRecipe : Recipe + { + public SpicyClamChowderRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 20, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 10, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 10, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(SpicyClamChowderRecipe), Item.Get().UILink(), 10, typeof(CulinaryArtsSpeedSkill)); + this.Initialize("Spicy Clam Chowder", typeof(SpicyClamChowderRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/Tallow.cs b/AutoGen/Food/Tallow.cs new file mode 100644 index 0000000..640fd9b --- /dev/null +++ b/AutoGen/Food/Tallow.cs @@ -0,0 +1,33 @@ +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(20)] + [Fuel(10000)] + public partial class TallowItem : + FoodItem + { + public override string FriendlyName { get { return "Tallow"; } } + public override string FriendlyNamePlural { get { return "Tallow"; } } + public override string Description { get { return "Rendered animal fat useful for more than just cooking."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 0, Fat = 20, Protein = 0, Vitamins = 0}; + public override float Calories { get { return 200; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + +} \ No newline at end of file diff --git a/AutoGen/Food/Tortilla.cs b/AutoGen/Food/Tortilla.cs new file mode 100644 index 0000000..f753a56 --- /dev/null +++ b/AutoGen/Food/Tortilla.cs @@ -0,0 +1,57 @@ +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(100)] + public partial class TortillaItem : + FoodItem + { + public override string FriendlyName { get { return "Cookie"; } } + public override string Description { get { return "Just the perfect food to start a day!\n\nPart of STC custom ECO tweaks by Atoru"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 25, Fat = 1, Protein = 25, Vitamins = 35}; + public override float Calories { get { return 666; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(CulinaryArtsSkill), 2)] + public partial class TortillaRecipe : Recipe + { + public TortillaRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 3, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 2, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 1, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 1, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 1, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MolecularGastronomyEfficiencySkill), 2, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy), + }; + //default crafting speed 5 + var craftingspeed = 2.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(TortillaRecipe), Item.Get().UILink(), craftingspeed, typeof(CulinaryArtsSpeedSkill)); + this.Initialize("Cookie", typeof(TortillaRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/TunaCasserole.cs b/AutoGen/Food/TunaCasserole.cs new file mode 100644 index 0000000..a0c0fd3 --- /dev/null +++ b/AutoGen/Food/TunaCasserole.cs @@ -0,0 +1,52 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + [Serialized] + [Weight(500)] + public partial class TunaCasseroleItem : + FoodItem + { + public override string FriendlyName { get { return "Tuna Casserole"; } } + public override string FriendlyNamePlural { get { return "Tuna Casserole"; } } + public override string Description { get { return "A fishy smelling casserole."; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 15, Fat = 10, Protein = 10, Vitamins = 1}; + public override float Calories { get { return 1250; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(CulinaryArtsSkill), 3)] + public partial class TunaCasseroleRecipe : Recipe + { + public TunaCasseroleRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 20, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 20, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(TunaCasseroleRecipe), Item.Get().UILink(), 3, typeof(CulinaryArtsSpeedSkill)); + this.Initialize("Tuna Casserole", typeof(TunaCasseroleRecipe)); + CraftingComponent.AddRecipe(typeof(StoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/TunaSalad.cs b/AutoGen/Food/TunaSalad.cs new file mode 100644 index 0000000..9f558aa --- /dev/null +++ b/AutoGen/Food/TunaSalad.cs @@ -0,0 +1,52 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(500)] + public partial class TunaSaladItem : + FoodItem + { + public override string FriendlyName { get { return "Tuna Salad"; } } + public override string FriendlyNamePlural { get { return "Tuna Salad"; } } + public override string Description { get { return "Don't be a Tuna head, eat more green!"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 3, Fat = 3, Protein = 8, Vitamins = 8 }; + public override float Calories { get { return 600; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(HomeCookingSkill), 4)] + public partial class TunaSaladRecipe : Recipe + { + public TunaSaladRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 10, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 5, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(TunaSaladRecipe), Item.Get().UILink(), 3, typeof(HomeCookingSpeedSkill)); + this.Initialize("Tuna Salad", typeof(TunaSaladRecipe)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Food/TunafishSandwich.cs b/AutoGen/Food/TunafishSandwich.cs new file mode 100644 index 0000000..6cd490e --- /dev/null +++ b/AutoGen/Food/TunafishSandwich.cs @@ -0,0 +1,53 @@ +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.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Localization; + + [Serialized] + [Weight(600)] + public partial class TunafishSandwichItem : + FoodItem + { + public override string FriendlyName { get { return "Tunafish Sandwich"; } } + public override string Description { get { return "Sure beats Hucklebutter and Jelly Sandwiches!"; } } + + private static Nutrients nutrition = new Nutrients() { Carbs = 10, Fat = 14, Protein = 20, Vitamins = 21 }; + public override float Calories { get { return 1200; } } + public override Nutrients Nutrition { get { return nutrition; } } + } + + [RequiresSkill(typeof(CulinaryArtsSkill), 1)] + public partial class TunafishSandwichRecipe : Recipe + { + public TunafishSandwichRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 5, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CulinaryArtsEfficiencySkill), 10, CulinaryArtsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(TunafishSandwichRecipe), Item.Get().UILink(), 10, typeof(CulinaryArtsSpeedSkill)); + this.Initialize("Tunafish Sandwich", typeof(TunafishSandwichRecipe)); + CraftingComponent.AddRecipe(typeof(KitchenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Item/AsphaltRamp.cs b/AutoGen/Item/AsphaltRamp.cs new file mode 100644 index 0000000..be18fa8 --- /dev/null +++ b/AutoGen/Item/AsphaltRamp.cs @@ -0,0 +1,51 @@ +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(RoadConstructionSkill), 3)] + public partial class AsphaltRampRecipe : Recipe + { + public AsphaltRampRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 3, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 3, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 3, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(AsphaltRampRecipe), Item.Get().UILink(), 5, typeof(RoadConstructionSkill)); + this.Initialize("Asphalt Ramp", typeof(AsphaltRampRecipe)); + + CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this); + } + } + + [Serialized] + [Constructed] + [Road(1)] + [RequiresSkill(typeof(RoadConstructionEfficiencySkill), 3)] + public partial class AsphaltRampBlock : + Block + { } + +} \ No newline at end of file diff --git a/AutoGen/Item/AsphaltRampUpgrade.cs b/AutoGen/Item/AsphaltRampUpgrade.cs new file mode 100644 index 0000000..13a4709 --- /dev/null +++ b/AutoGen/Item/AsphaltRampUpgrade.cs @@ -0,0 +1,51 @@ +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(RoadConstructionSkill), 3)] + public partial class AsphaltRampUpgradeRecipe : Recipe + { + public AsphaltRampUpgradeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 3, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 3, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 3, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(AsphaltRampUpgradeRecipe), Item.Get().UILink(), 5, typeof(RoadConstructionSkill)); + this.Initialize("Asphalt Ramp Upgrade", typeof(AsphaltRampUpgradeRecipe)); + + CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this); + } + } + + [Serialized] + [Constructed] + [Road(1)] + [RequiresSkill(typeof(RoadConstructionEfficiencySkill), 3)] + public partial class AsphaltRampUpgradeBlock : + Block + { } + +} \ No newline at end of file diff --git a/AutoGen/Item/AsphaltRoad.cs b/AutoGen/Item/AsphaltRoad.cs new file mode 100644 index 0000000..fe75034 --- /dev/null +++ b/AutoGen/Item/AsphaltRoad.cs @@ -0,0 +1,64 @@ +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(RoadConstructionSkill), 3)] + public partial class AsphaltRoadRecipe : Recipe + { + public AsphaltRoadRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 1, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 1, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 1, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(AsphaltRoadRecipe), Item.Get().UILink(), 1, typeof(RoadConstructionSkill)); + this.Initialize("Asphalt Road", typeof(AsphaltRoadRecipe)); + + CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this); + } + } + + [Serialized] + [Solid, Wall, Constructed] + [Road(1)] + [UsesRamp(typeof(AsphaltRoadWorldObjectBlock))] + [RequiresSkill(typeof(RoadConstructionEfficiencySkill), 3)] + public partial class AsphaltRoadBlock : + Block + { } + + [Serialized] + [MaxStackSize(10)] + [Weight(10000)] + [MakesRoads] + public partial class AsphaltRoadItem : + RoadItem + { + public override string FriendlyName { get { return "Asphalt Road"; } } + public override string Description { get { return "A paved surface constructed with asphalt and concrete. It's durable and extremely efficient for any wheeled vehicle."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/AsphaltRoadUpgrade.cs b/AutoGen/Item/AsphaltRoadUpgrade.cs new file mode 100644 index 0000000..b962e15 --- /dev/null +++ b/AutoGen/Item/AsphaltRoadUpgrade.cs @@ -0,0 +1,64 @@ +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(RoadConstructionSkill), 3)] + public partial class AsphaltRoadUpgradeRecipe : Recipe + { + public AsphaltRoadUpgradeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 1, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 1, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 1, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(AsphaltRoadUpgradeRecipe), Item.Get().UILink(), 1, typeof(RoadConstructionSkill)); + this.Initialize("Asphalt Road", typeof(AsphaltRoadUpgradeRecipe)); + + CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this); + } + } + + [Serialized] + [Solid, Wall, Constructed] + [Road(1)] + [UsesRamp(typeof(AsphaltRoadWorldObjectBlock))] + [RequiresSkill(typeof(RoadConstructionEfficiencySkill), 3)] + public partial class AsphaltRoadUpgradeBlock : + Block + { } + + [Serialized] + [MaxStackSize(10)] + [Weight(10000)] + [MakesRoads] + public partial class AsphaltRoadUpgradeItem : + RoadItem + { + public override string FriendlyName { get { return "Asphalt Road"; } } + public override string Description { get { return "A paved surface constructed with asphalt and concrete. It's durable and extremely efficient for any wheeled vehicle."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/Barrel.cs b/AutoGen/Item/Barrel.cs new file mode 100644 index 0000000..dd877a6 --- /dev/null +++ b/AutoGen/Item/Barrel.cs @@ -0,0 +1,63 @@ +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; + using Eco.Gameplay.Pipes.LiquidComponents; + + [RequiresSkill(typeof(PetrolRefiningSkill), 0)] + public partial class BarrelRecipe : Recipe + { + public BarrelRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(PetrolRefiningEfficiencySkill), 5, PetrolRefiningEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(PetrolRefiningEfficiencySkill), 3, PetrolRefiningEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(PetrolRefiningEfficiencySkill), 6, PetrolRefiningEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(BarrelRecipe), Item.Get().UILink(), 1, typeof(PetrolRefiningSpeedSkill)); + this.Initialize("Barrel", typeof(BarrelRecipe)); + + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } + + [Serialized] + [Solid] + [RequiresSkill(typeof(PetrolRefiningEfficiencySkill), 0)] + public partial class BarrelBlock : + PickupableBlock + { } + + [Serialized] + [MaxStackSize(10)] + [Weight(2000)] + [Currency] + public partial class BarrelItem : + BlockItem + { + public override string FriendlyName { get { return "Barrel"; } } + public override string Description { get { return "Expertly crafted from smoothed boards and metal bands, this can carry a variety of substances."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/Biodiesel.cs b/AutoGen/Item/Biodiesel.cs new file mode 100644 index 0000000..f099ead --- /dev/null +++ b/AutoGen/Item/Biodiesel.cs @@ -0,0 +1,63 @@ +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; + using Eco.Gameplay.Pipes.LiquidComponents; + + [RequiresSkill(typeof(PetrolRefiningSkill), 2)] + public partial class BiodieselRecipe : Recipe + { + public BiodieselRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(PetrolRefiningEfficiencySkill), 10, PetrolRefiningEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(BiodieselRecipe), Item.Get().UILink(), 2, typeof(PetrolRefiningSpeedSkill)); + this.Initialize("Biodiesel", typeof(BiodieselRecipe)); + + CraftingComponent.AddRecipe(typeof(OilRefineryObject), this); + } + } + + [Serialized] + [Solid] + [RequiresSkill(typeof(PetrolRefiningEfficiencySkill), 2)] + public partial class BiodieselBlock : + PickupableBlock + { } + + [Serialized] + [MaxStackSize(10)] + [Weight(30000)] + [Fuel(60000)] + [Currency] + public partial class BiodieselItem : + BlockItem + { + public override string FriendlyName { get { return "Biodiesel"; } } + public override string FriendlyNamePlural { get { return "Biodiesel"; } } + public override string Description { get { return "A vegetable or animal fat-based diesel fuel."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/Board.cs b/AutoGen/Item/Board.cs new file mode 100644 index 0000000..cd2aedb --- /dev/null +++ b/AutoGen/Item/Board.cs @@ -0,0 +1,54 @@ +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(WoodworkingSkill), 0)] + public partial class BoardRecipe : Recipe + { + public BoardRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(2), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 4, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(BoardRecipe), Item.Get().UILink(), 0.5f, typeof(WoodworkingSpeedSkill)); + this.Initialize("Board", typeof(BoardRecipe)); + + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } + + + [Serialized] + [Weight(500)] + [Fuel(2500)] + [Currency] + public partial class BoardItem : + Item + { + public override string FriendlyName { get { return "Board"; } } + public override string Description { get { return "Can be used in simple crafts, or used to create workbenches."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/Charcoal.cs b/AutoGen/Item/Charcoal.cs new file mode 100644 index 0000000..2137862 --- /dev/null +++ b/AutoGen/Item/Charcoal.cs @@ -0,0 +1,54 @@ +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(AdvancedSmeltingSkill), 1)] + public partial class CharcoalRecipe : Recipe + { + public CharcoalRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(2), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(AlloySmeltingEfficiencySkill), 10, AlloySmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(CharcoalRecipe), Item.Get().UILink(), 1, typeof(AlloySmeltingEfficiencySkill)); + this.Initialize("Charcoal", typeof(CharcoalRecipe)); + + CraftingComponent.AddRecipe(typeof(BlastFurnaceObject), this); + } + } + + + [Serialized] + [Weight(1000)] + [Fuel(25000)] + [Currency] + public partial class CharcoalItem : + Item + { + public override string FriendlyName { get { return "Charcoal"; } } + public override string Description { get { return "A black residue, consisting of carbon and any remaining ash."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/Coal.cs b/AutoGen/Item/Coal.cs new file mode 100644 index 0000000..3535752 --- /dev/null +++ b/AutoGen/Item/Coal.cs @@ -0,0 +1,56 @@ +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; + + + [Serialized] + [Minable, Solid,Wall] + public partial class CoalBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(5000)] + [Fuel(20000)] + [ResourcePile] + [Currency] + public partial class CoalItem : + BlockItem + { + public override string FriendlyName { get { return "Coal"; } } + public override string FriendlyNamePlural { get { return "Coal"; } } + public override string Description { get { return "A combustible mineral which when used as a fuel provides lots of energy but generates lots of pollution."; } } + + public override bool CanStickToWalls { get { return false; } } + + private static Type[] blockTypes = new Type[] { + typeof(CoalStacked1Block), + typeof(CoalStacked2Block), + typeof(CoalStacked3Block), + typeof(CoalStacked4Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class CoalStacked1Block : PickupableBlock { } + [Serialized, Solid] public class CoalStacked2Block : PickupableBlock { } + [Serialized, Solid] public class CoalStacked3Block : PickupableBlock { } + [Serialized, Solid,Wall] public class CoalStacked4Block : PickupableBlock { } //Only a wall if it's all 4 Coal +} \ No newline at end of file diff --git a/AutoGen/Item/CombustionEngine.cs b/AutoGen/Item/CombustionEngine.cs new file mode 100644 index 0000000..e6856bc --- /dev/null +++ b/AutoGen/Item/CombustionEngine.cs @@ -0,0 +1,56 @@ +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(MechanicalEngineeringSkill), 3)] + public partial class CombustionEngineRecipe : Recipe + { + public CombustionEngineRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 10, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 5, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 5, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(CombustionEngineRecipe), Item.Get().UILink(), 5, typeof(MechanicsAssemblySpeedSkill)); + this.Initialize("Combustion Engine", typeof(CombustionEngineRecipe)); + + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } + + + [Serialized] + [Weight(1000)] + [Currency] + public partial class CombustionEngineItem : + Item + { + public override string FriendlyName { get { return "Combustion Engine"; } } + public override string Description { get { return "An engine that generates power by combustion of fuel."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/Concrete.cs b/AutoGen/Item/Concrete.cs new file mode 100644 index 0000000..4807620 --- /dev/null +++ b/AutoGen/Item/Concrete.cs @@ -0,0 +1,55 @@ +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(CementSkill), 1)] + public partial class ConcreteRecipe : Recipe + { + public ConcreteRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CementProductionEfficiencySkill), 40, CementProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CementProductionEfficiencySkill), 25, CementProductionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(ConcreteRecipe), Item.Get().UILink(), 2, typeof(CementProductionSpeedSkill)); + this.Initialize("Concrete", typeof(ConcreteRecipe)); + + CraftingComponent.AddRecipe(typeof(CementKilnObject), this); + } + } + + + [Serialized] + [Weight(10000)] + [Currency] + public partial class ConcreteItem : + Item + { + public override string FriendlyName { get { return "Concrete"; } } + public override string FriendlyNamePlural { get { return "Concrete"; } } + public override string Description { get { return "A very strong building material made from cement and an aggregate like crushed stone."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/CopperIngot.cs b/AutoGen/Item/CopperIngot.cs new file mode 100644 index 0000000..98ffc02 --- /dev/null +++ b/AutoGen/Item/CopperIngot.cs @@ -0,0 +1,54 @@ +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(BasicSmeltingSkill), 1)] + public partial class CopperIngotRecipe : Recipe + { + public CopperIngotRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicSmeltingEfficiencySkill), 25, BasicSmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(CopperIngotRecipe), Item.Get().UILink(), 2, typeof(BasicSmeltingSpeedSkill)); + this.Initialize("Copper Ingot", typeof(CopperIngotRecipe)); + + CraftingComponent.AddRecipe(typeof(BloomeryObject), this); + } + } + + + [Serialized] + [Weight(4000)] + [Currency] + public partial class CopperIngotItem : + Item + { + public override string FriendlyName { get { return "Copper Ingot"; } } + public override string Description { get { return "A hefty block of copper."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/CopperOre.cs b/AutoGen/Item/CopperOre.cs new file mode 100644 index 0000000..3e38279 --- /dev/null +++ b/AutoGen/Item/CopperOre.cs @@ -0,0 +1,55 @@ +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; + + + [Serialized] + [Minable, Solid,Wall] + public partial class CopperOreBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(10000)] + [ResourcePile] + [Currency] + public partial class CopperOreItem : + BlockItem + { + public override string FriendlyName { get { return "Copper Ore"; } } + public override string FriendlyNamePlural { get { return "Copper Ore"; } } + public override string Description { get { return "Unrefined ore with traces of copper."; } } + + public override bool CanStickToWalls { get { return false; } } + + private static Type[] blockTypes = new Type[] { + typeof(CopperOreStacked1Block), + typeof(CopperOreStacked2Block), + typeof(CopperOreStacked3Block), + typeof(CopperOreStacked4Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class CopperOreStacked1Block : PickupableBlock { } + [Serialized, Solid] public class CopperOreStacked2Block : PickupableBlock { } + [Serialized, Solid] public class CopperOreStacked3Block : PickupableBlock { } + [Serialized, Solid,Wall] public class CopperOreStacked4Block : PickupableBlock { } //Only a wall if it's all 4 CopperOre +} \ No newline at end of file diff --git a/AutoGen/Item/CopperWiring.cs b/AutoGen/Item/CopperWiring.cs new file mode 100644 index 0000000..b70d711 --- /dev/null +++ b/AutoGen/Item/CopperWiring.cs @@ -0,0 +1,54 @@ +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(MechanicalEngineeringSkill), 2)] + public partial class CopperWiringRecipe : Recipe + { + public CopperWiringRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(4), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsComponentsEfficiencySkill), 5, MechanicsComponentsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(CopperWiringRecipe), Item.Get().UILink(), 2, typeof(MechanicsComponentsSpeedSkill)); + this.Initialize("Copper Wiring", typeof(CopperWiringRecipe)); + + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } + + + [Serialized] + [Weight(200)] + [Currency] + public partial class CopperWiringItem : + Item + { + public override string FriendlyName { get { return "Copper Wiring"; } } + public override string FriendlyNamePlural { get { return "Copper Wiring"; } } + public override string Description { get { return "A length of conductive wire useful for a variety of purposes."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/Gearbox.cs b/AutoGen/Item/Gearbox.cs new file mode 100644 index 0000000..df23f01 --- /dev/null +++ b/AutoGen/Item/Gearbox.cs @@ -0,0 +1,54 @@ +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(MechanicalEngineeringSkill), 1)] + public partial class GearboxRecipe : Recipe + { + public GearboxRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 7, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 5, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(GearboxRecipe), Item.Get().UILink(), 2, typeof(MechanicsAssemblySpeedSkill)); + this.Initialize("Gearbox", typeof(GearboxRecipe)); + + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } + + + [Serialized] + [Weight(1000)] + [Currency] + public partial class GearboxItem : + Item + { + public override string FriendlyName { get { return "Gearbox"; } } + public override string Description { get { return "Provides speed and torque conversions from a rotating power source to another device"; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/GoldIngot.cs b/AutoGen/Item/GoldIngot.cs new file mode 100644 index 0000000..6bd699c --- /dev/null +++ b/AutoGen/Item/GoldIngot.cs @@ -0,0 +1,54 @@ +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(BasicSmeltingSkill), 3)] + public partial class GoldIngotRecipe : Recipe + { + public GoldIngotRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicSmeltingEfficiencySkill), 25, BasicSmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(GoldIngotRecipe), Item.Get().UILink(), 2, typeof(BasicSmeltingSpeedSkill)); + this.Initialize("Gold Ingot", typeof(GoldIngotRecipe)); + + CraftingComponent.AddRecipe(typeof(BloomeryObject), this); + } + } + + + [Serialized] + [Weight(4000)] + [Currency] + public partial class GoldIngotItem : + Item + { + public override string FriendlyName { get { return "Gold Ingot"; } } + public override string Description { get { return "A shiny, refined gold ingot."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/GoldOre.cs b/AutoGen/Item/GoldOre.cs new file mode 100644 index 0000000..b3abd1f --- /dev/null +++ b/AutoGen/Item/GoldOre.cs @@ -0,0 +1,55 @@ +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; + + + [Serialized] + [Minable, Solid,Wall] + public partial class GoldOreBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(10000)] + [ResourcePile] + [Currency] + public partial class GoldOreItem : + BlockItem + { + public override string FriendlyName { get { return "Gold Ore"; } } + public override string FriendlyNamePlural { get { return "Gold Ore"; } } + public override string Description { get { return "Unrefined ore with traces of gold."; } } + + public override bool CanStickToWalls { get { return false; } } + + private static Type[] blockTypes = new Type[] { + typeof(GoldOreStacked1Block), + typeof(GoldOreStacked2Block), + typeof(GoldOreStacked3Block), + typeof(GoldOreStacked4Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class GoldOreStacked1Block : PickupableBlock { } + [Serialized, Solid] public class GoldOreStacked2Block : PickupableBlock { } + [Serialized, Solid] public class GoldOreStacked3Block : PickupableBlock { } + [Serialized, Solid,Wall] public class GoldOreStacked4Block : PickupableBlock { } //Only a wall if it's all 4 GoldOre +} \ No newline at end of file diff --git a/AutoGen/Item/HewnLog.cs b/AutoGen/Item/HewnLog.cs new file mode 100644 index 0000000..cd5ecdc --- /dev/null +++ b/AutoGen/Item/HewnLog.cs @@ -0,0 +1,72 @@ +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(BasicCraftingSkill), 0)] + public partial class HewnLogRecipe : Recipe + { + public HewnLogRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HewnLogProcessingEfficiencySkill), 2, HewnLogProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(HewnLogRecipe), Item.Get().UILink(), 0.2f, typeof(HewnLogProcessingSpeedSkill)); + this.Initialize("Hewn Log", typeof(HewnLogRecipe)); + + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } + + [Serialized] + [Solid, Wall, Constructed,BuildRoomMaterialOption] + [Tier(1)] + [RequiresSkill(typeof(HewnLogProcessingEfficiencySkill), 0)] + public partial class HewnLogBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(10000)] + [Fuel(2000)] + [Currency] + public partial class HewnLogItem : + BlockItem + { + public override string FriendlyName { get { return "Hewn Log"; } } + public override string Description { get { return "A log hewn and shaped to be a building material."; } } + + + private static Type[] blockTypes = new Type[] { + typeof(HewnLogStacked1Block), + typeof(HewnLogStacked2Block), + typeof(HewnLogStacked3Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class HewnLogStacked1Block : PickupableBlock { } + [Serialized, Solid] public class HewnLogStacked2Block : PickupableBlock { } + [Serialized, Solid,Wall] public class HewnLogStacked3Block : PickupableBlock { } //Only a wall if it's all 4 HewnLog +} \ No newline at end of file diff --git a/AutoGen/Item/IronIngot.cs b/AutoGen/Item/IronIngot.cs new file mode 100644 index 0000000..eecb6db --- /dev/null +++ b/AutoGen/Item/IronIngot.cs @@ -0,0 +1,54 @@ +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(BasicSmeltingSkill), 2)] + public partial class IronIngotRecipe : Recipe + { + public IronIngotRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicSmeltingEfficiencySkill), 25, BasicSmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(IronIngotRecipe), Item.Get().UILink(), 2, typeof(BasicSmeltingSpeedSkill)); + this.Initialize("Iron Ingot", typeof(IronIngotRecipe)); + + CraftingComponent.AddRecipe(typeof(BloomeryObject), this); + } + } + + + [Serialized] + [Weight(4000)] + [Currency] + public partial class IronIngotItem : + Item + { + public override string FriendlyName { get { return "Iron Ingot"; } } + public override string Description { get { return "Refined block of iron."; } } + + } + +} diff --git a/AutoGen/Item/IronOre.cs b/AutoGen/Item/IronOre.cs new file mode 100644 index 0000000..0160fa0 --- /dev/null +++ b/AutoGen/Item/IronOre.cs @@ -0,0 +1,55 @@ +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; + + + [Serialized] + [Minable, Solid,Wall] + public partial class IronOreBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(10000)] + [ResourcePile] + [Currency] + public partial class IronOreItem : + BlockItem + { + public override string FriendlyName { get { return "Iron Ore"; } } + public override string FriendlyNamePlural { get { return "Iron Ore"; } } + public override string Description { get { return "Unrefined ore with traces of iron."; } } + + public override bool CanStickToWalls { get { return false; } } + + private static Type[] blockTypes = new Type[] { + typeof(IronOreStacked1Block), + typeof(IronOreStacked2Block), + typeof(IronOreStacked3Block), + typeof(IronOreStacked4Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class IronOreStacked1Block : PickupableBlock { } + [Serialized, Solid] public class IronOreStacked2Block : PickupableBlock { } + [Serialized, Solid] public class IronOreStacked3Block : PickupableBlock { } + [Serialized, Solid,Wall] public class IronOreStacked4Block : PickupableBlock { } //Only a wall if it's all 4 IronOre +} \ No newline at end of file diff --git a/AutoGen/Item/Log.cs b/AutoGen/Item/Log.cs new file mode 100644 index 0000000..8c7d236 --- /dev/null +++ b/AutoGen/Item/Log.cs @@ -0,0 +1,54 @@ +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; + + + [Serialized] + [Solid, Wall, Constructed] + public partial class LogBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(5000)] + [Fuel(2000)] + [ResourcePile] + [Currency] + public partial class LogItem : + BlockItem + { + public override string FriendlyName { get { return "Log"; } } + public override string Description { get { return "A stack of logs."; } } + + + private static Type[] blockTypes = new Type[] { + typeof(LogStacked1Block), + typeof(LogStacked2Block), + typeof(LogStacked3Block), + typeof(LogStacked4Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class LogStacked1Block : PickupableBlock { } + [Serialized, Solid] public class LogStacked2Block : PickupableBlock { } + [Serialized, Solid] public class LogStacked3Block : PickupableBlock { } + [Serialized, Solid,Wall] public class LogStacked4Block : PickupableBlock { } //Only a wall if it's all 4 Log +} \ No newline at end of file diff --git a/AutoGen/Item/Lumber.cs b/AutoGen/Item/Lumber.cs new file mode 100644 index 0000000..cf0cac4 --- /dev/null +++ b/AutoGen/Item/Lumber.cs @@ -0,0 +1,76 @@ +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(LumberSkill), 1)] + public partial class LumberRecipe : Recipe + { + public LumberRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LumberProcessingEfficiencySkill), 4, LumberProcessingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberProcessingEfficiencySkill), 5, LumberProcessingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(LumberRecipe), Item.Get().UILink(), 1, typeof(LumberProcessingSpeedSkill)); + this.Initialize("Lumber", typeof(LumberRecipe)); + + CraftingComponent.AddRecipe(typeof(SawmillObject), this); + } + } + + [Serialized] + [Solid, Wall, Constructed,BuildRoomMaterialOption] + [Tier(2)] + [RequiresSkill(typeof(LumberProcessingEfficiencySkill), 1)] + public partial class LumberBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(10000)] + [Fuel(4000)] + [Currency] + public partial class LumberItem : + BlockItem + { + public override string FriendlyName { get { return "Lumber"; } } + public override string Description { get { return "Can be fashioned into various usable equipment."; } } + + + private static Type[] blockTypes = new Type[] { + typeof(LumberStacked1Block), + typeof(LumberStacked2Block), + typeof(LumberStacked3Block), + typeof(LumberStacked4Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class LumberStacked1Block : PickupableBlock { } + [Serialized, Solid] public class LumberStacked2Block : PickupableBlock { } + [Serialized, Solid] public class LumberStacked3Block : PickupableBlock { } + [Serialized, Solid,Wall] public class LumberStacked4Block : PickupableBlock { } //Only a wall if it's all 4 Lumber +} \ No newline at end of file diff --git a/AutoGen/Item/MortaredStone.cs b/AutoGen/Item/MortaredStone.cs new file mode 100644 index 0000000..17f5ec8 --- /dev/null +++ b/AutoGen/Item/MortaredStone.cs @@ -0,0 +1,72 @@ +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(MortarProductionSkill), 0)] + public partial class MortaredStoneRecipe : Recipe + { + public MortaredStoneRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MortarProductionEfficiencySkill), 8, MortarProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MortarProductionEfficiencySkill), 3, MortarProductionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(MortaredStoneRecipe), Item.Get().UILink(), 0.3f, typeof(MortarProductionSpeedSkill)); + this.Initialize("Mortared Stone", typeof(MortaredStoneRecipe)); + + CraftingComponent.AddRecipe(typeof(MasonryTableObject), this); + } + } + + [Serialized] + [Solid, Wall, Constructed,BuildRoomMaterialOption] + [Tier(1)] + [RequiresSkill(typeof(MortarProductionEfficiencySkill), 0)] + public partial class MortaredStoneBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(10000)] + [Currency] + public partial class MortaredStoneItem : + BlockItem + { + public override string FriendlyName { get { return "Mortared Stone"; } } + public override string Description { get { return "Used to create tough but rudimentary buildings."; } } + + + private static Type[] blockTypes = new Type[] { + typeof(MortaredStoneStacked1Block), + typeof(MortaredStoneStacked2Block), + typeof(MortaredStoneStacked3Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class MortaredStoneStacked1Block : PickupableBlock { } + [Serialized, Solid] public class MortaredStoneStacked2Block : PickupableBlock { } + [Serialized, Solid,Wall] public class MortaredStoneStacked3Block : PickupableBlock { } //Only a wall if it's all 4 MortaredStone +} \ No newline at end of file diff --git a/AutoGen/Item/Piston.cs b/AutoGen/Item/Piston.cs new file mode 100644 index 0000000..502a52b --- /dev/null +++ b/AutoGen/Item/Piston.cs @@ -0,0 +1,54 @@ +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(MechanicalEngineeringSkill), 2)] + public partial class PistonRecipe : Recipe + { + public PistonRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsComponentsEfficiencySkill), 5, MechanicsComponentsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsComponentsEfficiencySkill), 7, MechanicsComponentsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(PistonRecipe), Item.Get().UILink(), 2, typeof(MechanicsComponentsSpeedSkill)); + this.Initialize("Piston", typeof(PistonRecipe)); + + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } + + + [Serialized] + [Weight(1000)] + [Currency] + public partial class PistonItem : + Item + { + public override string FriendlyName { get { return "Piston"; } } + public override string Description { get { return "A moving component that transfers force. Can also function as a valve occasionally."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/ReinforcedConcrete.cs b/AutoGen/Item/ReinforcedConcrete.cs new file mode 100644 index 0000000..9300f9c --- /dev/null +++ b/AutoGen/Item/ReinforcedConcrete.cs @@ -0,0 +1,76 @@ +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(CementSkill), 1)] + public partial class ReinforcedConcreteRecipe : Recipe + { + public ReinforcedConcreteRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CementProductionEfficiencySkill), 1, CementProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CementProductionEfficiencySkill), 2, CementProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(CementProductionEfficiencySkill), 2, CementProductionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(ReinforcedConcreteRecipe), Item.Get().UILink(), 2, typeof(CementProductionSpeedSkill)); + this.Initialize("Reinforced Concrete", typeof(ReinforcedConcreteRecipe)); + + CraftingComponent.AddRecipe(typeof(CementKilnObject), this); + } + } + + [Serialized] + [Solid, Wall, Constructed,BuildRoomMaterialOption] + [Tier(3)] + [RequiresSkill(typeof(CementProductionEfficiencySkill), 1)] + public partial class ReinforcedConcreteBlock : + Block + { } + + [Serialized] + [MaxStackSize(20)] + [Weight(10000)] + [Currency] + public partial class ReinforcedConcreteItem : + BlockItem + { + public override string FriendlyName { get { return "Reinforced Concrete"; } } + public override string FriendlyNamePlural { get { return "Reinforced Concrete"; } } + public override string Description { get { return "A study construction material poured around a latice of rebar."; } } + + + private static Type[] blockTypes = new Type[] { + typeof(ReinforcedConcreteStacked1Block), + typeof(ReinforcedConcreteStacked2Block), + typeof(ReinforcedConcreteStacked3Block), + typeof(ReinforcedConcreteStacked4Block) + }; + public override Type[] BlockTypes { get { return blockTypes; } } + } + + [Serialized, Solid] public class ReinforcedConcreteStacked1Block : PickupableBlock { } + [Serialized, Solid] public class ReinforcedConcreteStacked2Block : PickupableBlock { } + [Serialized, Solid] public class ReinforcedConcreteStacked3Block : PickupableBlock { } + [Serialized, Solid,Wall] public class ReinforcedConcreteStacked4Block : PickupableBlock { } //Only a wall if it's all 4 ReinforcedConcrete +} \ No newline at end of file diff --git a/AutoGen/Item/Steel.cs b/AutoGen/Item/Steel.cs new file mode 100644 index 0000000..ab250a4 --- /dev/null +++ b/AutoGen/Item/Steel.cs @@ -0,0 +1,55 @@ +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(AlloySmeltingSkill), 2)] + public partial class SteelRecipe : Recipe + { + public SteelRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(AlloySmeltingEfficiencySkill), 6, AlloySmeltingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(AlloySmeltingEfficiencySkill), 2, AlloySmeltingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(AlloySmeltingEfficiencySkill), 2, AlloySmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(SteelRecipe), Item.Get().UILink(), 5, typeof(AlloySmeltingSpeedSkill)); + this.Initialize("Steel", typeof(SteelRecipe)); + + CraftingComponent.AddRecipe(typeof(BlastFurnaceObject), this); + } + } + + + [Serialized] + [Weight(4000)] + [Currency] + public partial class SteelItem : + Item + { + public override string FriendlyName { get { return "Steel"; } } + public override string Description { get { return "A strong alloy of iron and other elements."; } } + + } + +} \ No newline at end of file diff --git a/AutoGen/Item/StoneRampUpgrade.cs b/AutoGen/Item/StoneRampUpgrade.cs new file mode 100644 index 0000000..ace9978 --- /dev/null +++ b/AutoGen/Item/StoneRampUpgrade.cs @@ -0,0 +1,51 @@ +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(RoadConstructionSkill), 1)] + public partial class StoneRampUpgradeRecipe : Recipe + { + public StoneRampUpgradeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 20, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(RoadConstructionEfficiencySkill), 3, RoadConstructionEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = CreateCraftTimeValue(typeof(StoneRampUpgradeRecipe), Item.Get().UILink(), 1, typeof(RoadConstructionSkill)); + this.Initialize("Stone Ramp", typeof(StoneRampUpgradeRecipe)); + + CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this); + CraftingComponent.AddRecipe(typeof(MasonryTableObject), this); + } + } + + [Serialized] + [Constructed] + [Road(1)] + [RequiresSkill(typeof(RoadConstructionEfficiencySkill), 1)] + public partial class StoneRampUpgradeBlock : + Block + { } + +} \ No newline at end of file diff --git a/AutoGen/Recipe/BakedPitch.cs b/AutoGen/Recipe/BakedPitch.cs new file mode 100644 index 0000000..37f33e1 --- /dev/null +++ b/AutoGen/Recipe/BakedPitch.cs @@ -0,0 +1,32 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(MortarProductionSkill), 3)] + public class BakedPitchRecipe : Recipe + { + public BakedPitchRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 20, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Baked Pitch", typeof(BakedPitchRecipe)); + this.CraftMinutes = CreateCraftTimeValue(typeof(BakedPitchRecipe), this.UILink(), 0.1f, typeof(BasicCraftingEfficiencySkill)); + CraftingComponent.AddRecipe(typeof(BakeryOvenObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ButcherBison.cs b/AutoGen/Recipe/ButcherBison.cs new file mode 100644 index 0000000..38dc231 --- /dev/null +++ b/AutoGen/Recipe/ButcherBison.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(LargeButcherySkill), 3)] + public class ButcherBisonRecipe : Recipe + { + public ButcherBisonRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(20), + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LargeButcheryEfficiencySkill), 1, LargeButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Butcher Bison", typeof(ButcherBisonRecipe)); + //default crafting speed 3 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(ButcherBisonRecipe), this.UILink(), craftingspeed, typeof(LargeButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ButcherElk.cs b/AutoGen/Recipe/ButcherElk.cs new file mode 100644 index 0000000..f53f435 --- /dev/null +++ b/AutoGen/Recipe/ButcherElk.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(LargeButcherySkill), 1)] + public class ButcherElkRecipe : Recipe + { + public ButcherElkRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(10), + new CraftingElement(2), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LargeButcheryEfficiencySkill), 1, LargeButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Butcher Elk", typeof(ButcherElkRecipe)); + //default crafting speed 1 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(ButcherElkRecipe), this.UILink(), craftingspeed, typeof(LargeButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ButcherFox.cs b/AutoGen/Recipe/ButcherFox.cs new file mode 100644 index 0000000..f80a048 --- /dev/null +++ b/AutoGen/Recipe/ButcherFox.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(SmallButcherySkill), 3)] + public class ButcherFoxRecipe : Recipe + { + public ButcherFoxRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(3), + new CraftingElement(2), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SmallButcheryEfficiencySkill), 1, SmallButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Butcher Fox", typeof(ButcherFoxRecipe)); + //default crafting speed 1 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(ButcherFoxRecipe), this.UILink(), craftingspeed, typeof(SmallButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ButcherHare.cs b/AutoGen/Recipe/ButcherHare.cs new file mode 100644 index 0000000..b663554 --- /dev/null +++ b/AutoGen/Recipe/ButcherHare.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(SmallButcherySkill), 1)] + public class ButcherHareRecipe : Recipe + { + public ButcherHareRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SmallButcheryEfficiencySkill), 1, SmallButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Butcher Hare", typeof(ButcherHareRecipe)); + //default crafting speed 1 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(ButcherHareRecipe), this.UILink(), craftingspeed, typeof(SmallButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ButcherTurkey.cs b/AutoGen/Recipe/ButcherTurkey.cs new file mode 100644 index 0000000..755f92b --- /dev/null +++ b/AutoGen/Recipe/ButcherTurkey.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(SmallButcherySkill), 1)] + public class ButcherTurkeyRecipe : Recipe + { + public ButcherTurkeyRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(2), + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SmallButcheryEfficiencySkill), 1, SmallButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Butcher Turkey", typeof(ButcherTurkeyRecipe)); + //default crafting speed 1 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(ButcherTurkeyRecipe), this.UILink(), craftingspeed, typeof(SmallButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ButcherWolf.cs b/AutoGen/Recipe/ButcherWolf.cs new file mode 100644 index 0000000..a5267ef --- /dev/null +++ b/AutoGen/Recipe/ButcherWolf.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(LargeButcherySkill), 2)] + public class ButcherWolfRecipe : Recipe + { + public ButcherWolfRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(4), + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LargeButcheryEfficiencySkill), 1, LargeButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Butcher Wolf", typeof(ButcherWolfRecipe)); + //default crafting speed 1.5f + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(ButcherWolfRecipe), this.UILink(), craftingspeed, typeof(LargeButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireBison.cs b/AutoGen/Recipe/CampfireBison.cs new file mode 100644 index 0000000..68d0ff7 --- /dev/null +++ b/AutoGen/Recipe/CampfireBison.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 4)] + public class CampfireBisonRecipe : Recipe + { + public CampfireBisonRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(16), + new CraftingElement(7), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Bison", typeof(CampfireBisonRecipe)); + //default crafting speed 20 + var craftingspeed = 2; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireBisonRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireElk.cs b/AutoGen/Recipe/CampfireElk.cs new file mode 100644 index 0000000..29989f0 --- /dev/null +++ b/AutoGen/Recipe/CampfireElk.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 2)] + public class CampfireElkRecipe : Recipe + { + public CampfireElkRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(7), + new CraftingElement(4), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Elk", typeof(CampfireElkRecipe)); + //default crafting speed 10 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireElkRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireFox.cs b/AutoGen/Recipe/CampfireFox.cs new file mode 100644 index 0000000..f61b172 --- /dev/null +++ b/AutoGen/Recipe/CampfireFox.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 3)] + public class CampfireFoxRecipe : Recipe + { + public CampfireFoxRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(2), + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Fox", typeof(CampfireFoxRecipe)); + //default crafting speed 4 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireFoxRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireHare.cs b/AutoGen/Recipe/CampfireHare.cs new file mode 100644 index 0000000..439d15a --- /dev/null +++ b/AutoGen/Recipe/CampfireHare.cs @@ -0,0 +1,34 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 1)] + public class CampfireHareRecipe : Recipe + { + public CampfireHareRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Hare", typeof(CampfireHareRecipe)); + //default crafting speed 1 + var craftingspeed = 0.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireHareRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireSalmon.cs b/AutoGen/Recipe/CampfireSalmon.cs new file mode 100644 index 0000000..c11a6cb --- /dev/null +++ b/AutoGen/Recipe/CampfireSalmon.cs @@ -0,0 +1,34 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 2)] + public class CampfireSalmonRecipe : Recipe + { + public CampfireSalmonRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(2), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Salmon", typeof(CampfireSalmonRecipe)); + //default crafting speed 5 + var craftingspeed = 2; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireSalmonRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireTrout.cs b/AutoGen/Recipe/CampfireTrout.cs new file mode 100644 index 0000000..e1b1a1f --- /dev/null +++ b/AutoGen/Recipe/CampfireTrout.cs @@ -0,0 +1,34 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 1)] + public class CampfireTroutRecipe : Recipe + { + public CampfireTroutRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Trout", typeof(CampfireTroutRecipe)); + //default crafting speed 3 + var craftingspeed = 1.1f; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireTroutRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireTuna.cs b/AutoGen/Recipe/CampfireTuna.cs new file mode 100644 index 0000000..761a49a --- /dev/null +++ b/AutoGen/Recipe/CampfireTuna.cs @@ -0,0 +1,34 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 4)] + public class CampfireTunaRecipe : Recipe + { + public CampfireTunaRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Tuna", typeof(CampfireTunaRecipe)); + //default crafting speed 10 + var craftingspeed = 2.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireTunaRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireTurkey.cs b/AutoGen/Recipe/CampfireTurkey.cs new file mode 100644 index 0000000..7ac090a --- /dev/null +++ b/AutoGen/Recipe/CampfireTurkey.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 1)] + public class CampfireTurkeyRecipe : Recipe + { + public CampfireTurkeyRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(2), + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Turkey", typeof(CampfireTurkeyRecipe)); + //default crafting speed 5 + var craftingspeed = 1.2f; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireTurkeyRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CampfireWolf.cs b/AutoGen/Recipe/CampfireWolf.cs new file mode 100644 index 0000000..a77d08e --- /dev/null +++ b/AutoGen/Recipe/CampfireWolf.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(CampfireCookingSkill), 3)] + public class CampfireWolfRecipe : Recipe + { + public CampfireWolfRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(3), + new CraftingElement(2), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(CampfireCookingEfficiencySkill), 1, CampfireCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Campfire Wolf", typeof(CampfireWolfRecipe)); + //default crafting speed 2 + var craftingspeed = 0.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(CampfireWolfRecipe), this.UILink(), craftingspeed, typeof(CampfireCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CampfireObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CleanSalmon.cs b/AutoGen/Recipe/CleanSalmon.cs new file mode 100644 index 0000000..be5c0bc --- /dev/null +++ b/AutoGen/Recipe/CleanSalmon.cs @@ -0,0 +1,34 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(SmallButcherySkill), 2)] + public class CleanSalmonRecipe : Recipe + { + public CleanSalmonRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(5), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SmallButcheryEfficiencySkill), 1, SmallButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Clean Salmon", typeof(CleanSalmonRecipe)); + //default crafting speed 1 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(CleanSalmonRecipe), this.UILink(), craftingspeed, typeof(SmallButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CleanTrout.cs b/AutoGen/Recipe/CleanTrout.cs new file mode 100644 index 0000000..1f01b2b --- /dev/null +++ b/AutoGen/Recipe/CleanTrout.cs @@ -0,0 +1,34 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(SmallButcherySkill), 1)] + public class CleanTroutRecipe : Recipe + { + public CleanTroutRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(3), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SmallButcheryEfficiencySkill), 1, SmallButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Clean Trout", typeof(CleanTroutRecipe)); + //default crafting speed 1.5 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(CleanTroutRecipe), this.UILink(), craftingspeed, typeof(SmallButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/CleanTuna.cs b/AutoGen/Recipe/CleanTuna.cs new file mode 100644 index 0000000..6b47383 --- /dev/null +++ b/AutoGen/Recipe/CleanTuna.cs @@ -0,0 +1,34 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(SmallButcherySkill), 3)] + public class CleanTunaRecipe : Recipe + { + public CleanTunaRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(10), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SmallButcheryEfficiencySkill), 1, SmallButcheryEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Clean Tuna", typeof(CleanTunaRecipe)); + //default crafting speed 2 + var craftingspeed = 1; + this.CraftMinutes = CreateCraftTimeValue(typeof(CleanTunaRecipe), this.UILink(), craftingspeed, typeof(SmallButcherySpeedSkill)); + CraftingComponent.AddRecipe(typeof(ButcheryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ExoticFruitSalad.cs b/AutoGen/Recipe/ExoticFruitSalad.cs new file mode 100644 index 0000000..4dabf17 --- /dev/null +++ b/AutoGen/Recipe/ExoticFruitSalad.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 3)] + public class ExoticFruitSaladRecipe : Recipe + { + public ExoticFruitSaladRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 20, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Exotic Fruit Salad", typeof(ExoticFruitSaladRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(ExoticFruitSaladRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ExoticSalad.cs b/AutoGen/Recipe/ExoticSalad.cs new file mode 100644 index 0000000..91c7163 --- /dev/null +++ b/AutoGen/Recipe/ExoticSalad.cs @@ -0,0 +1,36 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 2)] + public class ExoticSaladRecipe : Recipe + { + public ExoticSaladRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 10, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 10, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 20, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Exotic Salad", typeof(ExoticSaladRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(ExoticSaladRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ExoticVegetableMedley.cs b/AutoGen/Recipe/ExoticVegetableMedley.cs new file mode 100644 index 0000000..ec9b4c0 --- /dev/null +++ b/AutoGen/Recipe/ExoticVegetableMedley.cs @@ -0,0 +1,36 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 3)] + public class ExoticVegetableMedleyRecipe : Recipe + { + public ExoticVegetableMedleyRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 20, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 10, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Exotic Vegetable Medley", typeof(ExoticVegetableMedleyRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(ExoticVegetableMedleyRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/ForestSalad.cs b/AutoGen/Recipe/ForestSalad.cs new file mode 100644 index 0000000..8d2c896 --- /dev/null +++ b/AutoGen/Recipe/ForestSalad.cs @@ -0,0 +1,36 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 1)] + public class ForestSaladRecipe : Recipe + { + public ForestSaladRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 20, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 30, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 20, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Forest Salad", typeof(ForestSaladRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(ForestSaladRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/GrasslandSalad.cs b/AutoGen/Recipe/GrasslandSalad.cs new file mode 100644 index 0000000..d2e6d68 --- /dev/null +++ b/AutoGen/Recipe/GrasslandSalad.cs @@ -0,0 +1,36 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 1)] + public class GrasslandSaladRecipe : Recipe + { + public GrasslandSaladRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Grassland Salad", typeof(GrasslandSaladRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(GrasslandSaladRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/GrindStoneToDirt.cs b/AutoGen/Recipe/GrindStoneToDirt.cs new file mode 100644 index 0000000..78bda22 --- /dev/null +++ b/AutoGen/Recipe/GrindStoneToDirt.cs @@ -0,0 +1,32 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(MortarProductionSkill), 1)] + public class GrindStoneToDirtRecipe : Recipe + { + public GrindStoneToDirtRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(2), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MortarProductionEfficiencySkill), 4, MortarProductionEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Grind Stone To Dirt", typeof(GrindStoneToDirtRecipe)); + this.CraftMinutes = CreateCraftTimeValue(typeof(GrindStoneToDirtRecipe), this.UILink(), 3, typeof(MortarProductionSpeedSkill)); + CraftingComponent.AddRecipe(typeof(MasonryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/GrindStoneToSand.cs b/AutoGen/Recipe/GrindStoneToSand.cs new file mode 100644 index 0000000..d9449a2 --- /dev/null +++ b/AutoGen/Recipe/GrindStoneToSand.cs @@ -0,0 +1,32 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(MortarProductionSkill), 1)] + public class GrindStoneToSandRecipe : Recipe + { + public GrindStoneToSandRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MortarProductionEfficiencySkill), 5, MortarProductionEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Grind Stone To Sand", typeof(GrindStoneToSandRecipe)); + this.CraftMinutes = CreateCraftTimeValue(typeof(GrindStoneToSandRecipe), this.UILink(), 5, typeof(MortarProductionSpeedSkill)); + CraftingComponent.AddRecipe(typeof(MasonryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/MassCutWire.cs b/AutoGen/Recipe/MassCutWire.cs new file mode 100644 index 0000000..4412617 --- /dev/null +++ b/AutoGen/Recipe/MassCutWire.cs @@ -0,0 +1,32 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(IndustrialEngineeringSkill), 2)] + public class MassCutWireRecipe : Recipe + { + public MassCutWireRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(20), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 20, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Mass Cut Wire", typeof(MassCutWireRecipe)); + this.CraftMinutes = CreateCraftTimeValue(typeof(MassCutWireRecipe), this.UILink(), 5, typeof(IndustrialEngineeringSpeedSkill)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/MixedFruitSalad.cs b/AutoGen/Recipe/MixedFruitSalad.cs new file mode 100644 index 0000000..40c291f --- /dev/null +++ b/AutoGen/Recipe/MixedFruitSalad.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 2)] + public class MixedFruitSaladRecipe : Recipe + { + public MixedFruitSaladRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 40, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 20, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Mixed Fruit Salad", typeof(MixedFruitSaladRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(MixedFruitSaladRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/MixedSalad.cs b/AutoGen/Recipe/MixedSalad.cs new file mode 100644 index 0000000..288a333 --- /dev/null +++ b/AutoGen/Recipe/MixedSalad.cs @@ -0,0 +1,36 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 2)] + public class MixedSaladRecipe : Recipe + { + public MixedSaladRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 20, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Mixed Salad", typeof(MixedSaladRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(MixedSaladRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/MixedVegetableMedley.cs b/AutoGen/Recipe/MixedVegetableMedley.cs new file mode 100644 index 0000000..05fa849 --- /dev/null +++ b/AutoGen/Recipe/MixedVegetableMedley.cs @@ -0,0 +1,35 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(HomeCookingSkill), 2)] + public class MixedVegetableMedleyRecipe : Recipe + { + public MixedVegetableMedleyRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(HomeCookingEfficiencySkill), 15, HomeCookingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Mixed Vegetable Medley", typeof(MixedVegetableMedleyRecipe)); + //default crafting speed 2 + var craftingspeed = 1.5f; + this.CraftMinutes = CreateCraftTimeValue(typeof(MixedVegetableMedleyRecipe), this.UILink(), craftingspeed, typeof(HomeCookingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(CastIronStoveObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/SmeltCopper.cs b/AutoGen/Recipe/SmeltCopper.cs new file mode 100644 index 0000000..ba2e442 --- /dev/null +++ b/AutoGen/Recipe/SmeltCopper.cs @@ -0,0 +1,32 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(BasicSmeltingSkill), 2)] + public class SmeltCopperRecipe : Recipe + { + public SmeltCopperRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicSmeltingEfficiencySkill), 20, BasicSmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Smelt Copper", typeof(SmeltCopperRecipe)); + this.CraftMinutes = CreateCraftTimeValue(typeof(SmeltCopperRecipe), this.UILink(), 0.5f, typeof(BasicSmeltingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(BlastFurnaceObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/SmeltGold.cs b/AutoGen/Recipe/SmeltGold.cs new file mode 100644 index 0000000..39e9e4a --- /dev/null +++ b/AutoGen/Recipe/SmeltGold.cs @@ -0,0 +1,32 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(BasicSmeltingSkill), 4)] + public class SmeltGoldRecipe : Recipe + { + public SmeltGoldRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicSmeltingEfficiencySkill), 20, BasicSmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Smelt Gold", typeof(SmeltGoldRecipe)); + this.CraftMinutes = CreateCraftTimeValue(typeof(SmeltGoldRecipe), this.UILink(), 0.5f, typeof(BasicSmeltingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(BlastFurnaceObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Recipe/SmeltIron.cs b/AutoGen/Recipe/SmeltIron.cs new file mode 100644 index 0000000..3da67d3 --- /dev/null +++ b/AutoGen/Recipe/SmeltIron.cs @@ -0,0 +1,32 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Components; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Items; + using Eco.Gameplay.Skills; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + + [RequiresSkill(typeof(BasicSmeltingSkill), 3)] + public class SmeltIronRecipe : Recipe + { + public SmeltIronRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(1), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicSmeltingEfficiencySkill), 20, BasicSmeltingEfficiencySkill.MultiplicativeStrategy), + }; + this.Initialize("Smelt Iron", typeof(SmeltIronRecipe)); + this.CraftMinutes = CreateCraftTimeValue(typeof(SmeltIronRecipe), this.UILink(), 0.5f, typeof(BasicSmeltingSpeedSkill)); + CraftingComponent.AddRecipe(typeof(BlastFurnaceObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeIronAx.cs b/AutoGen/Tool/UpgradeIronAx.cs new file mode 100644 index 0000000..27d374d --- /dev/null +++ b/AutoGen/Tool/UpgradeIronAx.cs @@ -0,0 +1,43 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + 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 UpgradeIronAxeRecipe : Recipe + { + public UpgradeIronAxeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeIronAxeRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Iron Axe", typeof(UpgradeIronAxeRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeIronHammer.cs b/AutoGen/Tool/UpgradeIronHammer.cs new file mode 100644 index 0000000..d782c7f --- /dev/null +++ b/AutoGen/Tool/UpgradeIronHammer.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 4)] + public partial class UpgradeIronHammerRecipe : Recipe + { + public UpgradeIronHammerRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeIronHammerRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Iron Hammer", typeof(UpgradeIronHammerRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeIronHoe.cs b/AutoGen/Tool/UpgradeIronHoe.cs new file mode 100644 index 0000000..16f1351 --- /dev/null +++ b/AutoGen/Tool/UpgradeIronHoe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeIronHoeRecipe : Recipe + { + public UpgradeIronHoeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeIronHoeRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Iron Hoe", typeof(UpgradeIronHoeRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeIronPickaxe.cs b/AutoGen/Tool/UpgradeIronPickaxe.cs new file mode 100644 index 0000000..1b64cd7 --- /dev/null +++ b/AutoGen/Tool/UpgradeIronPickaxe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + 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 UpgradeIronPickaxeRecipe : Recipe + { + public UpgradeIronPickaxeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeIronPickaxeRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Iron Pickaxe", typeof(UpgradeIronPickaxeRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeIronScythe.cs b/AutoGen/Tool/UpgradeIronScythe.cs new file mode 100644 index 0000000..4b28eda --- /dev/null +++ b/AutoGen/Tool/UpgradeIronScythe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeIronScytheRecipe : Recipe + { + public UpgradeIronScytheRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeIronScytheRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Iron Scythe", typeof(UpgradeIronScytheRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeIronShovel.cs b/AutoGen/Tool/UpgradeIronShovel.cs new file mode 100644 index 0000000..686c282 --- /dev/null +++ b/AutoGen/Tool/UpgradeIronShovel.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 2)] + public partial class UpgradeIronShovelRecipe : Recipe + { + public UpgradeIronShovelRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeIronShovelRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Iron Shovel", typeof(UpgradeIronShovelRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeSteelAx.cs b/AutoGen/Tool/UpgradeSteelAx.cs new file mode 100644 index 0000000..dd72516 --- /dev/null +++ b/AutoGen/Tool/UpgradeSteelAx.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeSteelAxeRecipe : Recipe + { + public UpgradeSteelAxeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeSteelAxeRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Steel Axe", typeof(UpgradeSteelAxeRecipe)); + + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeSteelHammer.cs b/AutoGen/Tool/UpgradeSteelHammer.cs new file mode 100644 index 0000000..b98fe64 --- /dev/null +++ b/AutoGen/Tool/UpgradeSteelHammer.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeSteelHammerRecipe : Recipe + { + public UpgradeSteelHammerRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeSteelHammerRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Steel Hammer", typeof(UpgradeSteelHammerRecipe)); + + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeSteelHoe.cs b/AutoGen/Tool/UpgradeSteelHoe.cs new file mode 100644 index 0000000..6a04bfc --- /dev/null +++ b/AutoGen/Tool/UpgradeSteelHoe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeSteelHoeRecipe : Recipe + { + public UpgradeSteelHoeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeSteelHoeRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Steel Hoe", typeof(UpgradeSteelHoeRecipe)); + + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeSteelPickaxe.cs b/AutoGen/Tool/UpgradeSteelPickaxe.cs new file mode 100644 index 0000000..b8b8704 --- /dev/null +++ b/AutoGen/Tool/UpgradeSteelPickaxe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeSteelPickaxeRecipe : Recipe + { + public UpgradeSteelPickaxeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeSteelPickaxeRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Steel Pickaxe", typeof(UpgradeSteelPickaxeRecipe)); + + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeSteelScythe.cs b/AutoGen/Tool/UpgradeSteelScythe.cs new file mode 100644 index 0000000..a17f107 --- /dev/null +++ b/AutoGen/Tool/UpgradeSteelScythe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeSteelScytheRecipe : Recipe + { + public UpgradeSteelScytheRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeSteelScytheRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Steel Scythe", typeof(UpgradeSteelScytheRecipe)); + + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeSteelShovel.cs b/AutoGen/Tool/UpgradeSteelShovel.cs new file mode 100644 index 0000000..6ce276c --- /dev/null +++ b/AutoGen/Tool/UpgradeSteelShovel.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class UpgradeSteelShovelRecipe : Recipe + { + public UpgradeSteelShovelRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20 ,SteelworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeSteelShovelRecipe), Item.Get().UILink(), .5f, typeof(SteelworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Steel Shovel", typeof(UpgradeSteelShovelRecipe)); + + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeStoneAx.cs b/AutoGen/Tool/UpgradeStoneAx.cs new file mode 100644 index 0000000..c58744f --- /dev/null +++ b/AutoGen/Tool/UpgradeStoneAx.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(MetalworkingSkill), 1)] + public partial class UpgradeStoneAxeRecipe : Recipe + { + public UpgradeStoneAxeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20 ,MetalworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeStoneAxeRecipe), Item.Get().UILink(), .5f, typeof(MetalworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Stone Axe", typeof(UpgradeStoneAxeRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeStoneHammer.cs b/AutoGen/Tool/UpgradeStoneHammer.cs new file mode 100644 index 0000000..1f8e996 --- /dev/null +++ b/AutoGen/Tool/UpgradeStoneHammer.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(MetalworkingSkill), 4)] + public partial class UpgradeStoneHammerRecipe : Recipe + { + public UpgradeStoneHammerRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20 ,MetalworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeStoneHammerRecipe), Item.Get().UILink(), .5f, typeof(MetalworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Stone Hammer", typeof(UpgradeStoneHammerRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeStonePickaxe.cs b/AutoGen/Tool/UpgradeStonePickaxe.cs new file mode 100644 index 0000000..e6ccbbc --- /dev/null +++ b/AutoGen/Tool/UpgradeStonePickaxe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(MetalworkingSkill), 1)] + public partial class UpgradeStonePickaxeRecipe : Recipe + { + public UpgradeStonePickaxeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20 ,MetalworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeStonePickaxeRecipe), Item.Get().UILink(), .5f, typeof(MetalworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Stone Pickaxe", typeof(UpgradeStonePickaxeRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeStoneScythe.cs b/AutoGen/Tool/UpgradeStoneScythe.cs new file mode 100644 index 0000000..a2390aa --- /dev/null +++ b/AutoGen/Tool/UpgradeStoneScythe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(MetalworkingSkill), 3)] + public partial class UpgradeStoneScytheRecipe : Recipe + { + public UpgradeStoneScytheRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20 ,MetalworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeStoneScytheRecipe), Item.Get().UILink(), .5f, typeof(MetalworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Stone Scythe", typeof(UpgradeStoneScytheRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeWoodenHoe.cs b/AutoGen/Tool/UpgradeWoodenHoe.cs new file mode 100644 index 0000000..553f3ab --- /dev/null +++ b/AutoGen/Tool/UpgradeWoodenHoe.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(MetalworkingSkill), 3)] + public partial class UpgradeWoodenHoeRecipe : Recipe + { + public UpgradeWoodenHoeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20 ,MetalworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeWoodenHoeRecipe), Item.Get().UILink(), .5f, typeof(MetalworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Wooden Hoe", typeof(UpgradeWoodenHoeRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Tool/UpgradeWoodenShovel.cs b/AutoGen/Tool/UpgradeWoodenShovel.cs new file mode 100644 index 0000000..5e00b1f --- /dev/null +++ b/AutoGen/Tool/UpgradeWoodenShovel.cs @@ -0,0 +1,42 @@ +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.Players; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.World; + using Eco.World.Blocks; + using Eco.Gameplay.Pipes; + + [RequiresSkill(typeof(MetalworkingSkill), 2)] + public partial class UpgradeWoodenShovelRecipe : Recipe + { + public UpgradeWoodenShovelRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(1), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20 ,MetalworkingEfficiencySkill.MultiplicativeStrategy) + }; + this.CraftMinutes = new MultiDynamicValue(MultiDynamicOps.Multiply + , CreateCraftTimeValue(typeof(UpgradeWoodenShovelRecipe), Item.Get().UILink(), .5f, typeof(MetalworkingSpeedSkill)) + + ); + this.Initialize("Upgrade Wooden Shovel", typeof(UpgradeWoodenShovelRecipe)); + + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/Vehicle/PoweredCart.cs b/AutoGen/Vehicle/PoweredCart.cs new file mode 100644 index 0000000..3b6a865 --- /dev/null +++ b/AutoGen/Vehicle/PoweredCart.cs @@ -0,0 +1,86 @@ +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(15000)] + public class PoweredCartItem : WorldObjectItem + { + public override string FriendlyName { get { return "Powered Cart"; } } + public override string Description { get { return "Large cart for hauling sizable loads."; } } + } + + [RequiresSkill(typeof(MechanicalEngineeringSkill), 0)] + public class PoweredCartRecipe : Recipe + { + public PoweredCartRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 1, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(25); + + this.Initialize("Powered Cart", typeof(PoweredCartRecipe)); + CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this); + } + } + [Serialized] + [RequireComponent(typeof(StandaloneAuthComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(MovableLinkComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(AirPollutionComponent))] + [RequireComponent(typeof(VehicleComponent))] + [RequireComponent(typeof(TailingsReportComponent))] + public class PoweredCartObject : PhysicsWorldObject + { + private static Dictionary roadEfficiency = new Dictionary() + { + { typeof(DirtRoadBlock), 1.0f }, { typeof(DirtRoadWorldObjectBlock), 1.0f }, + { typeof(StoneRoadBlock), 1.4f }, { typeof(StoneRoadWorldObjectBlock), 1.4f }, + { typeof(AsphaltRoadBlock), 1.8f }, { typeof(AsphaltRoadWorldObjectBlock), 1.8f } + }; + public override string FriendlyName { get { return "Powered Cart"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(PetroleumItem), +typeof(GasolineItem), + }; + + private PoweredCartObject() { } + + protected override void Initialize() + { + base.Initialize(); + + this.GetComponent().Initialize(20, 3000000); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(25); + this.GetComponent().Initialize(0.1f); + this.GetComponent().Initialize(20, 1, roadEfficiency); + } + } +} \ No newline at end of file diff --git a/AutoGen/Vehicle/SmallWoodCart.cs b/AutoGen/Vehicle/SmallWoodCart.cs new file mode 100644 index 0000000..2e184ea --- /dev/null +++ b/AutoGen/Vehicle/SmallWoodCart.cs @@ -0,0 +1,75 @@ +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); + } + } +} \ No newline at end of file diff --git a/AutoGen/Vehicle/WoodCart.cs b/AutoGen/Vehicle/WoodCart.cs new file mode 100644 index 0000000..9a547d3 --- /dev/null +++ b/AutoGen/Vehicle/WoodCart.cs @@ -0,0 +1,74 @@ +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(15000)] + public class WoodCartItem : WorldObjectItem + { + public override string FriendlyName { get { return "Wood Cart"; } } + public override string Description { get { return "Small wheelbarrow for hauling minimal loads."; } } + } + + [RequiresSkill(typeof(PrimitiveMechanicsSkill), 1)] + public class WoodCartRecipe : Recipe + { + public WoodCartRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(PrimitiveMechanicsEfficiencySkill), 50, PrimitiveMechanicsEfficiencySkill.MultiplicativeStrategy), + }; + this.CraftMinutes = new ConstantValue(5); + + this.Initialize("Wood Cart", typeof(WoodCartRecipe)); + CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this); + } + } + [Serialized] + [RequireComponent(typeof(StandaloneAuthComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(MovableLinkComponent))] + [RequireComponent(typeof(VehicleComponent))] + [RequireComponent(typeof(TailingsReportComponent))] + public class WoodCartObject : PhysicsWorldObject + { + private static Dictionary roadEfficiency = new Dictionary() + { + { typeof(DirtRoadBlock), 1.2f }, { typeof(DirtRoadWorldObjectBlock), 1.2f }, + { typeof(StoneRoadBlock), 1.4f }, { typeof(StoneRoadWorldObjectBlock), 1.4f }, + { typeof(AsphaltRoadBlock), 1.6f }, { typeof(AsphaltRoadWorldObjectBlock), 1.6f } + }; + public override string FriendlyName { get { return "Wood Cart"; } } + + + private WoodCartObject() { } + + protected override void Initialize() + { + base.Initialize(); + + this.GetComponent().Initialize(12, 1500000); + this.GetComponent().Initialize(10, 1, roadEfficiency); + this.GetComponent().HumanPowered(1); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Anvil.cs b/AutoGen/WorldObject/Anvil.cs new file mode 100644 index 0000000..fdc0ed5 --- /dev/null +++ b/AutoGen/WorldObject/Anvil.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class AnvilObject : + WorldObject + { + public override string FriendlyName { get { return "Anvil"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Set(AnvilItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class AnvilItem : WorldObjectItem + { + public override string FriendlyName { get { return "Anvil"; } } + public override string Description { get { return "A solid shaped piece of metal used to hammer ingots into tools and other useful things."; } } + + static AnvilItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 1)] + public partial class AnvilRecipe : Recipe + { + public AnvilRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(20, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(AnvilRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Anvil", typeof(AnvilRecipe)); + CraftingComponent.AddRecipe(typeof(BloomeryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/BakeryOven.cs b/AutoGen/WorldObject/BakeryOven.cs new file mode 100644 index 0000000..7308bdf --- /dev/null +++ b/AutoGen/WorldObject/BakeryOven.cs @@ -0,0 +1,125 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(45)] + [RequireRoomMaterialTier(2, 32)] + public partial class BakeryOvenObject : + WorldObject + { + public override string FriendlyName { get { return "Bakery Oven"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Cooking"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(10); + this.GetComponent().Set(BakeryOvenItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class BakeryOvenItem : WorldObjectItem + { + public override string FriendlyName { get { return "Bakery Oven"; } } + public override string Description { get { return "A solidly built brick oven useful for baking all manner of treats."; } } + + static BakeryOvenItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Kitchen", + Val = 3, + TypeForRoomLimit = "Baking", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(StoneworkingSkill), 2)] + public partial class BakeryOvenRecipe : Recipe + { + public BakeryOvenRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(StoneworkingEfficiencySkill), 30, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 20, StoneworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(20, StoneworkingSpeedSkill.MultiplicativeStrategy, typeof(StoneworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(BakeryOvenRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Bakery Oven", typeof(BakeryOvenRecipe)); + CraftingComponent.AddRecipe(typeof(MasonryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/BlastFurnace.cs b/AutoGen/WorldObject/BlastFurnace.cs new file mode 100644 index 0000000..1ec5c17 --- /dev/null +++ b/AutoGen/WorldObject/BlastFurnace.cs @@ -0,0 +1,134 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PipeComponent))] + [RequireComponent(typeof(AttachmentComponent))] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class BlastFurnaceObject : + WorldObject + { + public override string FriendlyName { get { return "Blast Furnace"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(50); + this.GetComponent().Set(BlastFurnaceItem.HousingVal); + + + var tankList = new List(); + + tankList.Add(new LiquidProducer("Chimney", typeof(SmogItem), 100, + null, + this.Occupancy.Find(x => x.Name == "ChimneyOut"), + (float)(0.25f * SmogItem.SmogItemsPerCO2PPM) / TimeUtil.SecondsPerHour)); + + + + this.GetComponent().Initialize(tankList); + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class BlastFurnaceItem : WorldObjectItem + { + public override string FriendlyName { get { return "Blast Furnace"; } } + public override string Description { get { return "A superior replacement for the bloomery that can produce steel."; } } + + static BlastFurnaceItem() + { + + + + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 4)] + public partial class BlastFurnaceRecipe : Recipe + { + public BlastFurnaceRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 10, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 25, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(60, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(BlastFurnaceRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Blast Furnace", typeof(BlastFurnaceRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Bloomery.cs b/AutoGen/WorldObject/Bloomery.cs new file mode 100644 index 0000000..e9da4d8 --- /dev/null +++ b/AutoGen/WorldObject/Bloomery.cs @@ -0,0 +1,121 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class BloomeryObject : + WorldObject + { + public override string FriendlyName { get { return "Bloomery"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(10); + this.GetComponent().Set(BloomeryItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class BloomeryItem : WorldObjectItem + { + public override string FriendlyName { get { return "Bloomery"; } } + public override string Description { get { return "A chimney-shaped furnace for smelting ores."; } } + + static BloomeryItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(StoneworkingSkill), 2)] + public partial class BloomeryRecipe : Recipe + { + public BloomeryRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(StoneworkingEfficiencySkill), 20, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 50, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, StoneworkingSpeedSkill.MultiplicativeStrategy, typeof(StoneworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(BloomeryRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Bloomery", typeof(BloomeryRecipe)); + CraftingComponent.AddRecipe(typeof(KilnObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Bookshelf.cs b/AutoGen/WorldObject/Bookshelf.cs new file mode 100644 index 0000000..7475aef --- /dev/null +++ b/AutoGen/WorldObject/Bookshelf.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class BookshelfObject : + WorldObject + { + public override string FriendlyName { get { return "Bookshelf"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Misc"); + this.GetComponent().Set(BookshelfItem.HousingVal); + + var storage = this.GetComponent(); + storage.Initialize(8); + storage.Storage.AddRestriction(new NotCarriedRestriction()); // can't store block or large items + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class BookshelfItem : WorldObjectItem + { + public override string FriendlyName { get { return "Bookshelf"; } } + public override string Description { get { return "A place to store knowledge and information; leads to the town hall."; } } + + static BookshelfItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Shelves", + DiminishingReturnPercent = 0.7f + };}} + } + + + [RequiresSkill(typeof(LumberWoodworkingSkill), 2)] + public partial class BookshelfRecipe : Recipe + { + public BookshelfRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 20, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 100, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 5, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, LumberWoodworkingSpeedSkill.MultiplicativeStrategy, typeof(LumberWoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(BookshelfRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Bookshelf", typeof(BookshelfRecipe)); + CraftingComponent.AddRecipe(typeof(SawmillObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Brazier.cs b/AutoGen/WorldObject/Brazier.cs new file mode 100644 index 0000000..fec8ab1 --- /dev/null +++ b/AutoGen/WorldObject/Brazier.cs @@ -0,0 +1,120 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class BrazierObject : + WorldObject + { + public override string FriendlyName { get { return "Brazier"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(BrazierItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class BrazierItem : WorldObjectItem + { + public override string FriendlyName { get { return "Brazier"; } } + public override string Description { get { return "A metal stand which can hold burning fuel to provide light."; } } + + static BrazierItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 4)] + public partial class BrazierRecipe : Recipe + { + public BrazierRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 10, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(BrazierRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Brazier", typeof(BrazierRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ButcheryTable.cs b/AutoGen/WorldObject/ButcheryTable.cs new file mode 100644 index 0000000..7a5dae7 --- /dev/null +++ b/AutoGen/WorldObject/ButcheryTable.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(1, 18)] + public partial class ButcheryTableObject : + WorldObject + { + public override string FriendlyName { get { return "Butchery Table"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Cooking"); + this.GetComponent().Set(ButcheryTableItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class ButcheryTableItem : WorldObjectItem + { + public override string FriendlyName { get { return "Butchery Table"; } } + public override string Description { get { return "A block and cleaver to process raw meat into fancier dishes."; } } + + static ButcheryTableItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Kitchen", + Val = 2, + TypeForRoomLimit = "Cooking", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(WoodworkingSkill), 3)] + public partial class ButcheryTableRecipe : Recipe + { + public ButcheryTableRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ButcheryTableRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Butchery Table", typeof(ButcheryTableRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Campfire.cs b/AutoGen/WorldObject/Campfire.cs new file mode 100644 index 0000000..a60041a --- /dev/null +++ b/AutoGen/WorldObject/Campfire.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class CampfireObject : + WorldObject + { + public override string FriendlyName { get { return "Campfire"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Cooking"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(10); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CampfireItem : WorldObjectItem + { + public override string FriendlyName { get { return "Campfire"; } } + public override string Description { get { return "Cook like a caveman on an uneven fire."; } } + + static CampfireItem() + { + + } + + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 0)] + public partial class CampfireRecipe : Recipe + { + public CampfireRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 5, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 10, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CampfireRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Campfire", typeof(CampfireRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/CandleStand.cs b/AutoGen/WorldObject/CandleStand.cs new file mode 100644 index 0000000..81f636a --- /dev/null +++ b/AutoGen/WorldObject/CandleStand.cs @@ -0,0 +1,116 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class CandleStandObject : + WorldObject + { + public override string FriendlyName { get { return "Candle Stand"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(TallowItem), + typeof(OilItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(CandleStandItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CandleStandItem : WorldObjectItem + { + public override string FriendlyName { get { return "Candle Stand"; } } + public override string Description { get { return "A fancy candelabra for providing small amounts of light."; } } + + static CandleStandItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 1)] + public partial class CandleStandRecipe : Recipe + { + public CandleStandRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 2, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CandleStandRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Candle Stand", typeof(CandleStandRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/CarpentryTable.cs b/AutoGen/WorldObject/CarpentryTable.cs new file mode 100644 index 0000000..574fe25 --- /dev/null +++ b/AutoGen/WorldObject/CarpentryTable.cs @@ -0,0 +1,101 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + public partial class CarpentryTableObject : + WorldObject + { + public override string FriendlyName { get { return "Carpentry Table"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CarpentryTableItem : WorldObjectItem + { + public override string FriendlyName { get { return "Carpentry Table"; } } + public override string Description { get { return "A table for basic wooden crafts for home improvement and progress."; } } + + static CarpentryTableItem() + { + + } + + } + + + [RequiresSkill(typeof(WoodworkingSkill), 0)] + public partial class CarpentryTableRecipe : Recipe + { + public CarpentryTableRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CarpentryTableRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Carpentry Table", typeof(CarpentryTableRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/CastIronStove.cs b/AutoGen/WorldObject/CastIronStove.cs new file mode 100644 index 0000000..0b1d1d7 --- /dev/null +++ b/AutoGen/WorldObject/CastIronStove.cs @@ -0,0 +1,127 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(45)] + [RequireRoomMaterialTier(2, 32)] + public partial class CastIronStoveObject : + WorldObject + { + public override string FriendlyName { get { return "Cast Iron Stove"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Cooking"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(10); + this.GetComponent().Set(CastIronStoveItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CastIronStoveItem : WorldObjectItem + { + public override string FriendlyName { get { return "Cast Iron Stove"; } } + public override string Description { get { return "The perfect stove for the fledgling chef."; } } + + static CastIronStoveItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Kitchen", + Val = 2, + TypeForRoomLimit = "Cooking", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 1)] + public partial class CastIronStoveRecipe : Recipe + { + public CastIronStoveRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(15, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CastIronStoveRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Cast Iron Stove", typeof(CastIronStoveRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/CeilingCandle.cs b/AutoGen/WorldObject/CeilingCandle.cs new file mode 100644 index 0000000..ae6c63e --- /dev/null +++ b/AutoGen/WorldObject/CeilingCandle.cs @@ -0,0 +1,116 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class CeilingCandleObject : + WorldObject + { + public override string FriendlyName { get { return "Ceiling Candle"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(TallowItem), + typeof(OilItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(CeilingCandleItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CeilingCandleItem : WorldObjectItem + { + public override string FriendlyName { get { return "Ceiling Candle"; } } + public override string Description { get { return "A fancy hanging candelabra."; } } + + static CeilingCandleItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 3)] + public partial class CeilingCandleRecipe : Recipe + { + public CeilingCandleRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 2, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CeilingCandleRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Ceiling Candle", typeof(CeilingCandleRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/CementKiln.cs b/AutoGen/WorldObject/CementKiln.cs new file mode 100644 index 0000000..f05c563 --- /dev/null +++ b/AutoGen/WorldObject/CementKiln.cs @@ -0,0 +1,139 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PipeComponent))] + [RequireComponent(typeof(AttachmentComponent))] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(45)] + [RequireRoomMaterialTier(2, 32)] + public partial class CementKilnObject : + WorldObject + { + public override string FriendlyName { get { return "Cement Kiln"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(50); + this.GetComponent().Set(CementKilnItem.HousingVal); + + + var tankList = new List(); + + tankList.Add(new LiquidProducer("Chimney", typeof(SmogItem), 100, + null, + this.Occupancy.Find(x => x.Name == "ChimneyOut"), + (float)(0.2f * SmogItem.SmogItemsPerCO2PPM) / TimeUtil.SecondsPerHour)); + + + + this.GetComponent().Initialize(tankList); + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CementKilnItem : WorldObjectItem + { + public override string FriendlyName { get { return "Cement Kiln"; } } + public override string Description { get { return "A rotary kiln that produces cement and concrete products."; } } + + static CementKilnItem() + { + + + + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 1)] + public partial class CementKilnRecipe : Recipe + { + public CementKilnRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 50, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 30, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 10, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(240, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CementKilnRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Cement Kiln", typeof(CementKilnRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} diff --git a/AutoGen/WorldObject/CombustionGenerator.cs b/AutoGen/WorldObject/CombustionGenerator.cs new file mode 100644 index 0000000..6464317 --- /dev/null +++ b/AutoGen/WorldObject/CombustionGenerator.cs @@ -0,0 +1,127 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerGeneratorComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class CombustionGeneratorObject : + WorldObject + { + public override string FriendlyName { get { return "Combustion Generator"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + typeof(PetroleumItem), + typeof(GasolineItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Power"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(100); + this.GetComponent().Initialize(30, new ElectricPower()); + this.GetComponent().Initialize(1500); + this.GetComponent().Set(CombustionGeneratorItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CombustionGeneratorItem : WorldObjectItem + { + public override string FriendlyName { get { return "Combustion Generator"; } } + public override string Description { get { return "Consumes most fuels to produce energy."; } } + + static CombustionGeneratorItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MechanicalEngineeringSkill), 3)] + public partial class CombustionGeneratorRecipe : Recipe + { + public CombustionGeneratorRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 5, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 10, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 1, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(30, MechanicsAssemblySpeedSkill.MultiplicativeStrategy, typeof(MechanicsAssemblySpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CombustionGeneratorRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Combustion Generator", typeof(CombustionGeneratorRecipe)); + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ComputerLab.cs b/AutoGen/WorldObject/ComputerLab.cs new file mode 100644 index 0000000..2abe1a2 --- /dev/null +++ b/AutoGen/WorldObject/ComputerLab.cs @@ -0,0 +1,72 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + + [Serialized] + public partial class ComputerLabItem : WorldObjectItem + { + public override string FriendlyName { get { return "Computer Lab"; } } + public override string Description { get { return "A place where you can sit all day and play video games! Or work on expert-level research."; } } + + static ComputerLabItem() + { + + } + + } + + + [RequiresSkill(typeof(IndustrialEngineeringSkill), 4)] + public partial class ComputerLabRecipe : Recipe + { + public ComputerLabRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 50, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 30, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 40, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(260, ElectronicEngineeringSpeedSkill.MultiplicativeStrategy, typeof(ElectronicEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ComputerLabRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Computer Lab", typeof(ComputerLabRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ConstructionPost.cs b/AutoGen/WorldObject/ConstructionPost.cs new file mode 100644 index 0000000..1683ccd --- /dev/null +++ b/AutoGen/WorldObject/ConstructionPost.cs @@ -0,0 +1,97 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class ConstructionPostObject : + WorldObject + { + public override string FriendlyName { get { return "Construction Post"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Economy"); + + + + this.AddAsPOI("Marker"); + } + + public override void Destroy() + { + base.Destroy(); + this.RemoveAsPOI("Marker"); + } + + } + + [Serialized] + public partial class ConstructionPostItem : WorldObjectItem + { + public override string FriendlyName { get { return "Construction Post"; } } + public override string Description { get { return "For contruction contracts."; } } + + static ConstructionPostItem() + { + + } + + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 1)] + public partial class ConstructionPostRecipe : Recipe + { + public ConstructionPostRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 1, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(2, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ConstructionPostRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Construction Post", typeof(ConstructionPostRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ContractBoard.cs b/AutoGen/WorldObject/ContractBoard.cs new file mode 100644 index 0000000..993a384 --- /dev/null +++ b/AutoGen/WorldObject/ContractBoard.cs @@ -0,0 +1,95 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class ContractBoardObject : + WorldObject + { + public override string FriendlyName { get { return "Contract Board"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Economy"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class ContractBoardItem : WorldObjectItem + { + public override string FriendlyName { get { return "Contract Board"; } } + public override string Description { get { return "A board to post contracts."; } } + + static ContractBoardItem() + { + + } + + } + + + [RequiresSkill(typeof(WoodworkingSkill), 1)] + public partial class ContractBoardRecipe : Recipe + { + public ContractBoardRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(15, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ContractBoardRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Contract Board", typeof(ContractBoardRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Couch.cs b/AutoGen/WorldObject/Couch.cs new file mode 100644 index 0000000..3aee3e3 --- /dev/null +++ b/AutoGen/WorldObject/Couch.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class CouchObject : + WorldObject + { + public override string FriendlyName { get { return "Couch"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Set(CouchItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CouchItem : WorldObjectItem + { + public override string FriendlyName { get { return "Couch"; } } + public override string Description { get { return "A sweet couch to lounge on. Now with room for your friends!"; } } + + static CouchItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Living", + Val = 3, + TypeForRoomLimit = "Seating", + DiminishingReturnPercent = 0.6f + };}} + } + + + [RequiresSkill(typeof(ClothProductionSkill), 4)] + public partial class CouchRecipe : Recipe + { + public CouchRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothProductionEfficiencySkill), 10, ClothProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothProductionEfficiencySkill), 20, ClothProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothProductionEfficiencySkill), 10, ClothProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothProductionEfficiencySkill), 20, ClothProductionEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, ClothProductionSpeedSkill.MultiplicativeStrategy, typeof(ClothProductionSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CouchRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Couch", typeof(CouchRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/CurrencyExchange.cs b/AutoGen/WorldObject/CurrencyExchange.cs new file mode 100644 index 0000000..d36db10 --- /dev/null +++ b/AutoGen/WorldObject/CurrencyExchange.cs @@ -0,0 +1,100 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(45)] + [RequireRoomMaterialTier(2, 32)] + public partial class CurrencyExchangeObject : + WorldObject + { + public override string FriendlyName { get { return "Currency Exchange"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Economy"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class CurrencyExchangeItem : WorldObjectItem + { + public override string FriendlyName { get { return "Currency Exchange"; } } + public override string Description { get { return "Allows players to exchange currency."; } } + + static CurrencyExchangeItem() + { + + } + + } + + + [RequiresSkill(typeof(MetalworkingSkill), 3)] + public partial class CurrencyExchangeRecipe : Recipe + { + public CurrencyExchangeRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 20, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(30, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(CurrencyExchangeRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Currency Exchange", typeof(CurrencyExchangeRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Door.cs b/AutoGen/WorldObject/Door.cs new file mode 100644 index 0000000..7b29970 --- /dev/null +++ b/AutoGen/WorldObject/Door.cs @@ -0,0 +1,96 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class DoorObject : + WorldObject + { + public override string FriendlyName { get { return "Door"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Misc"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class DoorItem : WorldObjectItem + { + public override string FriendlyName { get { return "Door"; } } + public override string Description { get { return "A sturdy wooden door. Can be locked for certain players."; } } + + static DoorItem() + { + + } + + } + + + [RequiresSkill(typeof(WoodworkingSkill), 0)] + public partial class DoorRecipe : Recipe + { + public DoorRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 6, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(DoorRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Door", typeof(DoorRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/EckoStatue.cs b/AutoGen/WorldObject/EckoStatue.cs new file mode 100644 index 0000000..7f8bd4e --- /dev/null +++ b/AutoGen/WorldObject/EckoStatue.cs @@ -0,0 +1,98 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class EckoStatueObject : + WorldObject + { + public override string FriendlyName { get { return "Ecko Statue"; } } + + + protected override void Initialize() + { + this.GetComponent().Set(EckoStatueItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class EckoStatueItem : WorldObjectItem + { + public override string FriendlyName { get { return "Ecko Statue"; } } + public override string Description { get { return "A statue of a dolphin. What could it mean?"; } } + + static EckoStatueItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 100, + TypeForRoomLimit = "Decoration", + DiminishingReturnPercent = 1.5f + };}} + } + + + public partial class EckoStatueRecipe : Recipe + { + public EckoStatueRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + }; + this.CraftMinutes = new ConstantValue(); + this.Initialize("Ecko Statue", typeof(EckoStatueRecipe)); + CraftingComponent.AddRecipe(typeof(Object), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ElectricWallLamp.cs b/AutoGen/WorldObject/ElectricWallLamp.cs new file mode 100644 index 0000000..b9f8e1a --- /dev/null +++ b/AutoGen/WorldObject/ElectricWallLamp.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class ElectricWallLampObject : + WorldObject + { + public override string FriendlyName { get { return "Electric Wall Lamp"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(35); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(ElectricWallLampItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class ElectricWallLampItem : WorldObjectItem + { + public override string FriendlyName { get { return "Electric Wall Lamp"; } } + public override string Description { get { return "A wall mounted lamp that requires electricity to turn on."; } } + + static ElectricWallLampItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 4, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(ElectronicEngineeringSkill), 3)] + public partial class ElectricWallLampRecipe : Recipe + { + public ElectricWallLampRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 10, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 4, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 4, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, ElectronicEngineeringSpeedSkill.MultiplicativeStrategy, typeof(ElectronicEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ElectricWallLampRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Electric Wall Lamp", typeof(ElectricWallLampRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ElectronicsAssembly.cs b/AutoGen/WorldObject/ElectronicsAssembly.cs new file mode 100644 index 0000000..0a0bf80 --- /dev/null +++ b/AutoGen/WorldObject/ElectronicsAssembly.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(2, 18)] + public partial class ElectronicsAssemblyObject : + WorldObject + { + public override string FriendlyName { get { return "Electronics Assembly"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Set(ElectronicsAssemblyItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class ElectronicsAssemblyItem : WorldObjectItem + { + public override string FriendlyName { get { return "Electronics Assembly"; } } + public override string Description { get { return "A set of machinery to create electronics."; } } + + static ElectronicsAssemblyItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(ElectronicEngineeringSkill), 0)] + public partial class ElectronicsAssemblyRecipe : Recipe + { + public ElectronicsAssemblyRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 20, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 2, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 6, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(60, ElectronicEngineeringSpeedSkill.MultiplicativeStrategy, typeof(ElectronicEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ElectronicsAssemblyRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Electronics Assembly", typeof(ElectronicsAssemblyRecipe)); + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/FramedGlassDoor.cs b/AutoGen/WorldObject/FramedGlassDoor.cs new file mode 100644 index 0000000..4ce8142 --- /dev/null +++ b/AutoGen/WorldObject/FramedGlassDoor.cs @@ -0,0 +1,94 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class FramedGlassDoorObject : + DoorObject + { + public override string FriendlyName { get { return "Framed Glass Door"; } } + + + protected override void Initialize() + { + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class FramedGlassDoorItem : WorldObjectItem + { + public override string FriendlyName { get { return "Framed Glass Door"; } } + public override string Description { get { return "A beautiful glass door made of steel and glass."; } } + + static FramedGlassDoorItem() + { + + } + + } + + + [RequiresSkill(typeof(GlassworkingSkill), 1)] + public partial class FramedGlassDoorRecipe : Recipe + { + public FramedGlassDoorRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(GlassProductionEfficiencySkill), 10, GlassProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(GlassProductionEfficiencySkill), 5, GlassProductionEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(20, GlassProductionSpeedSkill.MultiplicativeStrategy, typeof(GlassProductionSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(FramedGlassDoorRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Framed Glass Door", typeof(FramedGlassDoorRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Icebox.cs b/AutoGen/WorldObject/Icebox.cs new file mode 100644 index 0000000..03306c6 --- /dev/null +++ b/AutoGen/WorldObject/Icebox.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class IceboxObject : + WorldObject + { + public override string FriendlyName { get { return "Icebox"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Set(IceboxItem.HousingVal); + + var storage = this.GetComponent(); + storage.Initialize(8); + storage.Storage.AddRestriction(new NotCarriedRestriction()); // can't store block or large items + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class IceboxItem : WorldObjectItem + { + public override string FriendlyName { get { return "Icebox"; } } + public override string Description { get { return "A box of ice. It's in the name!"; } } + + static IceboxItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Kitchen", + Val = 2, + TypeForRoomLimit = "Food Storage", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(WoodworkingSkill), 4)] + public partial class IceboxRecipe : Recipe + { + public IceboxRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 10, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 10, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 10, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(IceboxRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Icebox", typeof(IceboxRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Kiln.cs b/AutoGen/WorldObject/Kiln.cs new file mode 100644 index 0000000..33e18e5 --- /dev/null +++ b/AutoGen/WorldObject/Kiln.cs @@ -0,0 +1,116 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(45)] + [RequireRoomMaterialTier(1, 32)] + public partial class KilnObject : + WorldObject + { + public override string FriendlyName { get { return "Kiln"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(50); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class KilnItem : WorldObjectItem + { + public override string FriendlyName { get { return "Kiln"; } } + public override string Description { get { return "Useful for baking bricks and finishing pottery."; } } + + static KilnItem() + { + + } + + } + + + [RequiresSkill(typeof(StoneworkingSkill), 4)] + public partial class KilnRecipe : Recipe + { + public KilnRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 20, StoneworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(30, StoneworkingSpeedSkill.MultiplicativeStrategy, typeof(StoneworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(KilnRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Kiln", typeof(KilnRecipe)); + CraftingComponent.AddRecipe(typeof(MasonryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Kitchen.cs b/AutoGen/WorldObject/Kitchen.cs new file mode 100644 index 0000000..00e8490 --- /dev/null +++ b/AutoGen/WorldObject/Kitchen.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(2, 18)] + public partial class KitchenObject : + WorldObject + { + public override string FriendlyName { get { return "Kitchen"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Cooking"); + this.GetComponent().Set(KitchenItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class KitchenItem : WorldObjectItem + { + public override string FriendlyName { get { return "Kitchen"; } } + public override string Description { get { return "A prep area for food which allows for more complex dishes."; } } + + static KitchenItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Kitchen", + Val = 3, + TypeForRoomLimit = "Cooking", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(LumberWoodworkingSkill), 1)] + public partial class KitchenRecipe : Recipe + { + public KitchenRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 20, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 40, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 10, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(120, LumberWoodworkingSpeedSkill.MultiplicativeStrategy, typeof(LumberWoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(KitchenRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Kitchen", typeof(KitchenRecipe)); + CraftingComponent.AddRecipe(typeof(SawmillObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Laboratory.cs b/AutoGen/WorldObject/Laboratory.cs new file mode 100644 index 0000000..15a75dc --- /dev/null +++ b/AutoGen/WorldObject/Laboratory.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(3, 18)] + public partial class LaboratoryObject : + WorldObject + { + public override string FriendlyName { get { return "Laboratory"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Cooking"); + this.GetComponent().Initialize(250); + this.GetComponent().Initialize(10, new ElectricPower()); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class LaboratoryItem : WorldObjectItem + { + public override string FriendlyName { get { return "Laboratory"; } } + public override string Description { get { return "For researching the science side of cooking. Science rules!"; } } + + static LaboratoryItem() + { + + } + + } + + + [RequiresSkill(typeof(IndustrialEngineeringSkill), 2)] + public partial class LaboratoryRecipe : Recipe + { + public LaboratoryRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 30, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 20, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(120, IndustrialEngineeringSpeedSkill.MultiplicativeStrategy, typeof(IndustrialEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(LaboratoryRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Laboratory", typeof(LaboratoryRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Laser.cs b/AutoGen/WorldObject/Laser.cs new file mode 100644 index 0000000..8b8b994 --- /dev/null +++ b/AutoGen/WorldObject/Laser.cs @@ -0,0 +1,80 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + + [Serialized] + public partial class LaserItem : WorldObjectItem + { + public override string FriendlyName { get { return "Laser"; } } + public override string Description { get { return "AVOID DIRECT EYE EXPOSURE"; } } + + static LaserItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(ElectronicEngineeringSkill), 4)] + public partial class LaserRecipe : Recipe + { + public LaserRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 150, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 150, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 150, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 150, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 150, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(240, ElectronicEngineeringSpeedSkill.MultiplicativeStrategy, typeof(ElectronicEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(LaserRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Laser", typeof(LaserRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/MachineShop.cs b/AutoGen/WorldObject/MachineShop.cs new file mode 100644 index 0000000..b8dbadc --- /dev/null +++ b/AutoGen/WorldObject/MachineShop.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(2, 18)] + public partial class MachineShopObject : + WorldObject + { + public override string FriendlyName { get { return "Machine Shop"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Set(MachineShopItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class MachineShopItem : WorldObjectItem + { + public override string FriendlyName { get { return "Machine Shop"; } } + public override string Description { get { return "A fancy toolbench that creates equally fancy toys."; } } + + static MachineShopItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MechanicalEngineeringSkill), 0)] + public partial class MachineShopRecipe : Recipe + { + public MachineShopRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 30, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 15, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 40, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(120, MechanicsAssemblySpeedSkill.MultiplicativeStrategy, typeof(MechanicsAssemblySpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(MachineShopRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Machine Shop", typeof(MachineShopRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/OilRefinery.cs b/AutoGen/WorldObject/OilRefinery.cs new file mode 100644 index 0000000..4c4cf44 --- /dev/null +++ b/AutoGen/WorldObject/OilRefinery.cs @@ -0,0 +1,136 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PipeComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class OilRefineryObject : + WorldObject + { + public override string FriendlyName { get { return "Oil Refinery"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(50); + this.GetComponent().Set(OilRefineryItem.HousingVal); + + + var tankList = new List(); + + tankList.Add(new LiquidProducer("Chimney", typeof(SmogItem), 100, + null, + this.Occupancy.Find(x => x.Name == "ChimneyOut"), + (float)(0.25f * SmogItem.SmogItemsPerCO2PPM) / TimeUtil.SecondsPerHour)); + + + + this.GetComponent().Initialize(tankList); + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class OilRefineryItem : WorldObjectItem + { + public override string FriendlyName { get { return "Oil Refinery"; } } + public override string Description { get { return "Sets of pipes and tanks which refine crude petroleum into usable products."; } } + + static OilRefineryItem() + { + + + + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MechanicalEngineeringSkill), 4)] + public partial class OilRefineryRecipe : Recipe + { + public OilRefineryRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 10, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 10, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 35, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 1, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(50, MechanicsAssemblySpeedSkill.MultiplicativeStrategy, typeof(MechanicsAssemblySpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(OilRefineryRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Oil Refinery", typeof(OilRefineryRecipe)); + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/PaddedChair.cs b/AutoGen/WorldObject/PaddedChair.cs new file mode 100644 index 0000000..54ff128 --- /dev/null +++ b/AutoGen/WorldObject/PaddedChair.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class PaddedChairObject : + WorldObject + { + public override string FriendlyName { get { return "Padded Chair"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Set(PaddedChairItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class PaddedChairItem : WorldObjectItem + { + public override string FriendlyName { get { return "Padded Chair"; } } + public override string Description { get { return "A comfy chair to rest in."; } } + + static PaddedChairItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Living", + Val = 2, + TypeForRoomLimit = "Seating", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(ClothProductionSkill), 3)] + public partial class PaddedChairRecipe : Recipe + { + public PaddedChairRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothProductionEfficiencySkill), 5, ClothProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothProductionEfficiencySkill), 20, ClothProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothProductionEfficiencySkill), 10, ClothProductionEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ClothProductionEfficiencySkill), 5, ClothProductionEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, ClothProductionSpeedSkill.MultiplicativeStrategy, typeof(ClothProductionSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(PaddedChairRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Padded Chair", typeof(PaddedChairRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/PlanterPotRound.cs b/AutoGen/WorldObject/PlanterPotRound.cs new file mode 100644 index 0000000..b6c755a --- /dev/null +++ b/AutoGen/WorldObject/PlanterPotRound.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class PlanterPotRoundObject : + WorldObject + { + public override string FriendlyName { get { return "Round Pot"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Set(PlanterPotRoundItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class PlanterPotRoundItem : WorldObjectItem + { + public override string FriendlyName { get { return "Round Pot"; } } + public override string Description { get { return "Sometimes you just want to bring a little bit of nature into your house."; } } + + static PlanterPotRoundItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 1, + TypeForRoomLimit = "Decoration", + DiminishingReturnPercent = 0.9f + };}} + } + + + [RequiresSkill(typeof(StoneworkingSkill), 3)] + public partial class PlanterPotRoundRecipe : Recipe + { + public PlanterPotRoundRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 2, StoneworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, StoneworkingSpeedSkill.MultiplicativeStrategy, typeof(StoneworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(PlanterPotRoundRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Planter Pot Round", typeof(PlanterPotRoundRecipe)); + CraftingComponent.AddRecipe(typeof(KilnObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/PlanterPotSquare.cs b/AutoGen/WorldObject/PlanterPotSquare.cs new file mode 100644 index 0000000..f9196d2 --- /dev/null +++ b/AutoGen/WorldObject/PlanterPotSquare.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class PlanterPotSquareObject : + WorldObject + { + public override string FriendlyName { get { return "Square Pot"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Set(PlanterPotSquareItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class PlanterPotSquareItem : WorldObjectItem + { + public override string FriendlyName { get { return "Square Pot"; } } + public override string Description { get { return "Sometimes you just want to bring a little bit of nature into your house."; } } + + static PlanterPotSquareItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 1, + TypeForRoomLimit = "Decoration", + DiminishingReturnPercent = 0.9f + };}} + } + + + [RequiresSkill(typeof(StoneworkingSkill), 3)] + public partial class PlanterPotSquareRecipe : Recipe + { + public PlanterPotSquareRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 2, StoneworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, StoneworkingSpeedSkill.MultiplicativeStrategy, typeof(StoneworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(PlanterPotSquareRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Planter Pot Square", typeof(PlanterPotSquareRecipe)); + CraftingComponent.AddRecipe(typeof(KilnObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/PumpJack.cs b/AutoGen/WorldObject/PumpJack.cs new file mode 100644 index 0000000..96182e6 --- /dev/null +++ b/AutoGen/WorldObject/PumpJack.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class PumpJackObject : + WorldObject + { + public override string FriendlyName { get { return "Pump Jack"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(100); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(PumpJackItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class PumpJackItem : WorldObjectItem + { + public override string FriendlyName { get { return "Pump Jack"; } } + public override string Description { get { return "Drill, baby! Drill!"; } } + + static PumpJackItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MechanicalEngineeringSkill), 4)] + public partial class PumpJackRecipe : Recipe + { + public PumpJackRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 30, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 5, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 10, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(50, MechanicsAssemblySpeedSkill.MultiplicativeStrategy, typeof(MechanicsAssemblySpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(PumpJackRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Pump Jack", typeof(PumpJackRecipe)); + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Refrigerator.cs b/AutoGen/WorldObject/Refrigerator.cs new file mode 100644 index 0000000..3090041 --- /dev/null +++ b/AutoGen/WorldObject/Refrigerator.cs @@ -0,0 +1,117 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class RefrigeratorObject : + WorldObject + { + public override string FriendlyName { get { return "Refrigerator"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Initialize(100); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(RefrigeratorItem.HousingVal); + + var storage = this.GetComponent(); + storage.Initialize(8); + storage.Storage.AddRestriction(new NotCarriedRestriction()); // can't store block or large items + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class RefrigeratorItem : WorldObjectItem + { + public override string FriendlyName { get { return "Refrigerator"; } } + public override string Description { get { return "An icebox from the future with significantly better cooling properties."; } } + + static RefrigeratorItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Kitchen", + Val = 10, + TypeForRoomLimit = "Food Storage", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(IndustrialEngineeringSkill), 3)] + public partial class RefrigeratorRecipe : Recipe + { + public RefrigeratorRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 18, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 10, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 5, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 5, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, IndustrialEngineeringSpeedSkill.MultiplicativeStrategy, typeof(IndustrialEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(RefrigeratorRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Refrigerator", typeof(RefrigeratorRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ResearchTable.cs b/AutoGen/WorldObject/ResearchTable.cs new file mode 100644 index 0000000..d858911 --- /dev/null +++ b/AutoGen/WorldObject/ResearchTable.cs @@ -0,0 +1,104 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(1, 18)] + public partial class ResearchTableObject : + WorldObject + { + public override string FriendlyName { get { return "Research Table"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Research"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class ResearchTableItem : WorldObjectItem + { + public override string FriendlyName { get { return "Research Table"; } } + public override string Description { get { return "A basic table for researching new technologies and skills."; } } + + static ResearchTableItem() + { + + } + + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 1)] + public partial class ResearchTableRecipe : Recipe + { + public ResearchTableRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 30, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 40, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 30, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 1, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ResearchTableRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Research Table", typeof(ResearchTableRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/RollingMill.cs b/AutoGen/WorldObject/RollingMill.cs new file mode 100644 index 0000000..f448876 --- /dev/null +++ b/AutoGen/WorldObject/RollingMill.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(2, 18)] + public partial class RollingMillObject : + WorldObject + { + public override string FriendlyName { get { return "Rolling Mill"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(250); + this.GetComponent().Initialize(10, new ElectricPower()); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class RollingMillItem : WorldObjectItem + { + public override string FriendlyName { get { return "Rolling Mill"; } } + public override string Description { get { return "For rolling steel into more buildable materials."; } } + + static RollingMillItem() + { + + } + + } + + + [RequiresSkill(typeof(SteelworkingSkill), 1)] + public partial class RollingMillRecipe : Recipe + { + public RollingMillRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SteelworkingEfficiencySkill), 20, SteelworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 15, SteelworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(45, SteelworkingSpeedSkill.MultiplicativeStrategy, typeof(SteelworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(RollingMillRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Rolling Mill", typeof(RollingMillRecipe)); + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Sawmill.cs b/AutoGen/WorldObject/Sawmill.cs new file mode 100644 index 0000000..af0cf3e --- /dev/null +++ b/AutoGen/WorldObject/Sawmill.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(1, 18)] + public partial class SawmillObject : + WorldObject + { + public override string FriendlyName { get { return "Sawmill"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + this.GetComponent().Initialize(100); + this.GetComponent().Initialize(5, new MechanicalPower()); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class SawmillItem : WorldObjectItem + { + public override string FriendlyName { get { return "Sawmill"; } } + public override string Description { get { return "Used to saw wood into lumber."; } } + + static SawmillItem() + { + + } + + } + + + [RequiresSkill(typeof(LumberWoodworkingSkill), 0)] + public partial class SawmillRecipe : Recipe + { + public SawmillRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 20, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 30, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(15, LumberWoodworkingSpeedSkill.MultiplicativeStrategy, typeof(LumberWoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(SawmillRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Sawmill", typeof(SawmillRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/ShelfCabinet.cs b/AutoGen/WorldObject/ShelfCabinet.cs new file mode 100644 index 0000000..4532884 --- /dev/null +++ b/AutoGen/WorldObject/ShelfCabinet.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class ShelfCabinetObject : + WorldObject + { + public override string FriendlyName { get { return "Shelf Cabinet"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Set(ShelfCabinetItem.HousingVal); + + var storage = this.GetComponent(); + storage.Initialize(8); + storage.Storage.AddRestriction(new NotCarriedRestriction()); // can't store block or large items + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class ShelfCabinetItem : WorldObjectItem + { + public override string FriendlyName { get { return "Shelf Cabinet"; } } + public override string Description { get { return "When a shelf and a cabinet aren't enough individually."; } } + + static ShelfCabinetItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Shelves", + DiminishingReturnPercent = 0.7f + };}} + } + + + [RequiresSkill(typeof(LumberWoodworkingSkill), 3)] + public partial class ShelfCabinetRecipe : Recipe + { + public ShelfCabinetRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 20, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 100, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 5, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, LumberWoodworkingSpeedSkill.MultiplicativeStrategy, typeof(LumberWoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(ShelfCabinetRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Shelf Cabinet", typeof(ShelfCabinetRecipe)); + CraftingComponent.AddRecipe(typeof(SawmillObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/SmallTable.cs b/AutoGen/WorldObject/SmallTable.cs new file mode 100644 index 0000000..55dac9c --- /dev/null +++ b/AutoGen/WorldObject/SmallTable.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class SmallTableObject : + WorldObject + { + public override string FriendlyName { get { return "Small Table"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Misc"); + this.GetComponent().Set(SmallTableItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class SmallTableItem : WorldObjectItem + { + public override string FriendlyName { get { return "Small Table"; } } + public override string Description { get { return "More of a nightstand than a table, really."; } } + + static SmallTableItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 1, + TypeForRoomLimit = "Table", + DiminishingReturnPercent = 0.7f + };}} + } + + + [RequiresSkill(typeof(WoodworkingSkill), 2)] + public partial class SmallTableRecipe : Recipe + { + public SmallTableRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 8, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 15, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(SmallTableRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Small Table", typeof(SmallTableRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/SmallWoodSign.cs b/AutoGen/WorldObject/SmallWoodSign.cs new file mode 100644 index 0000000..2029e1b --- /dev/null +++ b/AutoGen/WorldObject/SmallWoodSign.cs @@ -0,0 +1,70 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + + [Serialized] + public partial class SmallWoodSignItem : WorldObjectItem + { + public override string FriendlyName { get { return "Small Wood Sign"; } } + public override string Description { get { return "A small wooden sign for all your small text needs."; } } + + static SmallWoodSignItem() + { + + } + + } + + + [RequiresSkill(typeof(WoodworkingSkill), 1)] + public partial class SmallWoodSignRecipe : Recipe + { + public SmallWoodSignRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 8, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(SmallWoodSignRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Small Wood Sign", typeof(SmallWoodSignRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/SolarGenerator.cs b/AutoGen/WorldObject/SolarGenerator.cs new file mode 100644 index 0000000..d3c5a47 --- /dev/null +++ b/AutoGen/WorldObject/SolarGenerator.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerGeneratorComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class SolarGeneratorObject : + WorldObject + { + public override string FriendlyName { get { return "Solar Generator"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Power"); + this.GetComponent().Initialize(30, new ElectricPower()); + this.GetComponent().Initialize(1000); + this.GetComponent().Set(SolarGeneratorItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class SolarGeneratorItem : WorldObjectItem + { + public override string FriendlyName { get { return "Solar Generator"; } } + public override string Description { get { return "Generates electrical power from the sun! It also stores energy to work at night."; } } + + static SolarGeneratorItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(ElectronicEngineeringSkill), 4)] + public partial class SolarGeneratorRecipe : Recipe + { + public SolarGeneratorRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 20, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 10, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 10, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 4, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(50, ElectronicEngineeringSpeedSkill.MultiplicativeStrategy, typeof(ElectronicEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(SolarGeneratorRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Solar Generator", typeof(SolarGeneratorRecipe)); + CraftingComponent.AddRecipe(typeof(ElectronicsAssemblyObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/SteelCeilingLight.cs b/AutoGen/WorldObject/SteelCeilingLight.cs new file mode 100644 index 0000000..f79fd6c --- /dev/null +++ b/AutoGen/WorldObject/SteelCeilingLight.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class SteelCeilingLightObject : + WorldObject + { + public override string FriendlyName { get { return "Steel Ceiling Light"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(35); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(SteelCeilingLightItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class SteelCeilingLightItem : WorldObjectItem + { + public override string FriendlyName { get { return "Steel Ceiling Light"; } } + public override string Description { get { return "A more modern way to light up a room."; } } + + static SteelCeilingLightItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 5, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(SteelworkingSkill), 3)] + public partial class SteelCeilingLightRecipe : Recipe + { + public SteelCeilingLightRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SteelworkingEfficiencySkill), 10, SteelworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 2, SteelworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 5, SteelworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, SteelworkingSpeedSkill.MultiplicativeStrategy, typeof(SteelworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(SteelCeilingLightRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Steel Ceiling Light", typeof(SteelCeilingLightRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/SteelFloorLamp.cs b/AutoGen/WorldObject/SteelFloorLamp.cs new file mode 100644 index 0000000..96033d2 --- /dev/null +++ b/AutoGen/WorldObject/SteelFloorLamp.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class SteelFloorLampObject : + WorldObject + { + public override string FriendlyName { get { return "Steel Floor Lamp"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(35); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(SteelFloorLampItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class SteelFloorLampItem : WorldObjectItem + { + public override string FriendlyName { get { return "Steel Floor Lamp"; } } + public override string Description { get { return "A more modern way to light up a room. This time from the floor."; } } + + static SteelFloorLampItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 5, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(SteelworkingSkill), 2)] + public partial class SteelFloorLampRecipe : Recipe + { + public SteelFloorLampRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SteelworkingEfficiencySkill), 10, SteelworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 2, SteelworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 5, SteelworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, SteelworkingSpeedSkill.MultiplicativeStrategy, typeof(SteelworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(SteelFloorLampRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Steel Floor Lamp", typeof(SteelFloorLampRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/SteelTableLamp.cs b/AutoGen/WorldObject/SteelTableLamp.cs new file mode 100644 index 0000000..d6fcc8a --- /dev/null +++ b/AutoGen/WorldObject/SteelTableLamp.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class SteelTableLampObject : + WorldObject + { + public override string FriendlyName { get { return "Steel Table Lamp"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(35); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(SteelTableLampItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class SteelTableLampItem : WorldObjectItem + { + public override string FriendlyName { get { return "Steel Table Lamp"; } } + public override string Description { get { return "For late night studying. Or working. Or anything, really."; } } + + static SteelTableLampItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 4, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(SteelworkingSkill), 1)] + public partial class SteelTableLampRecipe : Recipe + { + public SteelTableLampRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(SteelworkingEfficiencySkill), 8, SteelworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 2, SteelworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(SteelworkingEfficiencySkill), 3, SteelworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, SteelworkingSpeedSkill.MultiplicativeStrategy, typeof(SteelworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(SteelTableLampRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Steel Table Lamp", typeof(SteelTableLampRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/StoneBrazier.cs b/AutoGen/WorldObject/StoneBrazier.cs new file mode 100644 index 0000000..d2862b2 --- /dev/null +++ b/AutoGen/WorldObject/StoneBrazier.cs @@ -0,0 +1,120 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class StoneBrazierObject : + WorldObject + { + public override string FriendlyName { get { return "Stone Brazier"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(StoneBrazierItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class StoneBrazierItem : WorldObjectItem + { + public override string FriendlyName { get { return "Stone Brazier"; } } + public override string Description { get { return "A stone stand which can hold burning fuel to provide light."; } } + + static StoneBrazierItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(StoneworkingSkill), 1)] + public partial class StoneBrazierRecipe : Recipe + { + public StoneBrazierRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(StoneworkingEfficiencySkill), 10, StoneworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, StoneworkingSpeedSkill.MultiplicativeStrategy, typeof(StoneworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(StoneBrazierRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Stone Brazier", typeof(StoneBrazierRecipe)); + CraftingComponent.AddRecipe(typeof(MasonryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/StoneWell.cs b/AutoGen/WorldObject/StoneWell.cs new file mode 100644 index 0000000..24bb3d7 --- /dev/null +++ b/AutoGen/WorldObject/StoneWell.cs @@ -0,0 +1,66 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + + [Serialized] + [Category("Hidden")] + public partial class StoneWellItem : WorldObjectItem + { + public override string FriendlyName { get { return "Stone Well"; } } + public override string Description { get { return "PLACEHOLDER"; } } + + static StoneWellItem() + { + + } + + } + + + public partial class StoneWellRecipe : Recipe + { + public StoneWellRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + }; + this.CraftMinutes = new ConstantValue(); + this.Initialize("Stone Well", typeof(StoneWellRecipe)); + CraftingComponent.AddRecipe(typeof(Object), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/StorageChest.cs b/AutoGen/WorldObject/StorageChest.cs new file mode 100644 index 0000000..a75d18f --- /dev/null +++ b/AutoGen/WorldObject/StorageChest.cs @@ -0,0 +1,100 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class StorageChestObject : + WorldObject + { + public override string FriendlyName { get { return "Storage Chest"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Storage"); + + var storage = this.GetComponent(); + storage.Initialize(16); + storage.Storage.AddRestriction(new NotCarriedRestriction()); // can't store block or large items + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class StorageChestItem : WorldObjectItem + { + public override string FriendlyName { get { return "Storage Chest"; } } + public override string Description { get { return "A container you can store items in."; } } + + static StorageChestItem() + { + + } + + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 1)] + public partial class StorageChestRecipe : Recipe + { + public StorageChestRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 10, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(2, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(StorageChestRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Storage Chest", typeof(StorageChestRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Store.cs b/AutoGen/WorldObject/Store.cs new file mode 100644 index 0000000..16f4a2a --- /dev/null +++ b/AutoGen/WorldObject/Store.cs @@ -0,0 +1,101 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(1, 18)] + public partial class StoreObject : + WorldObject + { + public override string FriendlyName { get { return "Store"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Economy"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class StoreItem : WorldObjectItem + { + public override string FriendlyName { get { return "Store"; } } + public override string Description { get { return "Allows the selling and trading of items."; } } + + static StoreItem() + { + + } + + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 1)] + public partial class StoreRecipe : Recipe + { + public StoreRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 10, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 10, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(15, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(StoreRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Store", typeof(StoreRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Stove.cs b/AutoGen/WorldObject/Stove.cs new file mode 100644 index 0000000..a409a18 --- /dev/null +++ b/AutoGen/WorldObject/Stove.cs @@ -0,0 +1,143 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(PipeComponent))] + + [RequireComponent(typeof(AttachmentComponent))] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(2, 18)] + public partial class StoveObject : + WorldObject + { + public override string FriendlyName { get { return "Stove"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(LogItem), + typeof(HewnLogItem), + typeof(LumberItem), + typeof(CharcoalItem), + typeof(ArrowItem), + typeof(BoardItem), + typeof(CoalItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Cooking"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(10); + this.GetComponent().Set(StoveItem.HousingVal); + + + var tankList = new List(); + + tankList.Add(new LiquidProducer("Chimney", typeof(SmogItem), 100, + null, + this.Occupancy.Find(x => x.Name == "ChimneyOut"), + (float)(0.1f * SmogItem.SmogItemsPerCO2PPM) / TimeUtil.SecondsPerHour)); + + + + this.GetComponent().Initialize(tankList); + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class StoveItem : WorldObjectItem + { + public override string FriendlyName { get { return "Stove"; } } + public override string Description { get { return "A heavy stove for cooking more complex dishes."; } } + + static StoveItem() + { + + + + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Kitchen", + Val = 4, + TypeForRoomLimit = "Cooking", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 1)] + public partial class StoveRecipe : Recipe + { + public StoveRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 45, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill),30, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill),30, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill),10, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(20, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(StoveRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Stove", typeof(StoveRecipe)); + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Streetlamp.cs b/AutoGen/WorldObject/Streetlamp.cs new file mode 100644 index 0000000..89bacf3 --- /dev/null +++ b/AutoGen/WorldObject/Streetlamp.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class StreetlampObject : + WorldObject + { + public override string FriendlyName { get { return "Streetlamp"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(35); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(StreetlampItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class StreetlampItem : WorldObjectItem + { + public override string FriendlyName { get { return "Streetlamp"; } } + public override string Description { get { return "A towering metal lightpost that requires electricity to run."; } } + + static StreetlampItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 4, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(ElectronicEngineeringSkill), 3)] + public partial class StreetlampRecipe : Recipe + { + public StreetlampRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 20, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 6, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(ElectronicEngineeringEfficiencySkill), 6, ElectronicEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, ElectronicEngineeringSpeedSkill.MultiplicativeStrategy, typeof(ElectronicEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(StreetlampRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Streetlamp", typeof(StreetlampRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Table.cs b/AutoGen/WorldObject/Table.cs new file mode 100644 index 0000000..0654a8c --- /dev/null +++ b/AutoGen/WorldObject/Table.cs @@ -0,0 +1,104 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class TableObject : + WorldObject + { + public override string FriendlyName { get { return "Table"; } } + + + protected override void Initialize() + { + this.GetComponent().Set(TableItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class TableItem : WorldObjectItem + { + public override string FriendlyName { get { return "Table"; } } + public override string Description { get { return "A large table for placing things on."; } } + + static TableItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Table", + DiminishingReturnPercent = 0.6f + };}} + } + + + [RequiresSkill(typeof(WoodworkingSkill), 2)] + public partial class TableRecipe : Recipe + { + public TableRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 10, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 30, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(TableRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Table", typeof(TableRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/TailoringTable.cs b/AutoGen/WorldObject/TailoringTable.cs new file mode 100644 index 0000000..e185425 --- /dev/null +++ b/AutoGen/WorldObject/TailoringTable.cs @@ -0,0 +1,102 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(45)] + [RequireRoomMaterialTier(1, 32)] + public partial class TailoringTableObject : + WorldObject + { + public override string FriendlyName { get { return "Tailoring Table"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class TailoringTableItem : WorldObjectItem + { + public override string FriendlyName { get { return "Tailoring Table"; } } + public override string Description { get { return "Spearhead the fashion movement with the finest clothes and� hair!"; } } + + static TailoringTableItem() + { + + } + + } + + + [RequiresSkill(typeof(WoodworkingSkill), 1)] + public partial class TailoringTableRecipe : Recipe + { + public TailoringTableRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 40, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 50, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(60, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(TailoringTableRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Tailoring Table", typeof(TailoringTableRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/TallowCandle.cs b/AutoGen/WorldObject/TallowCandle.cs new file mode 100644 index 0000000..a21fce3 --- /dev/null +++ b/AutoGen/WorldObject/TallowCandle.cs @@ -0,0 +1,117 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class TallowCandleObject : + WorldObject + { + public override string FriendlyName { get { return "Tallow Candle"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(TallowItem), + typeof(OilItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(TallowCandleItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class TallowCandleItem : WorldObjectItem + { + public override string FriendlyName { get { return "Tallow Candle"; } } + public override string Description { get { return "A candle which can burn tallow to produce a small amount of light."; } } + + static TallowCandleItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 1, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 2)] + public partial class TallowCandleRecipe : Recipe + { + public TallowCandleRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 3, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 3, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 2, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(2.5f, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(TallowCandleRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Tallow Candle", typeof(TallowCandleRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/TallowLamp.cs b/AutoGen/WorldObject/TallowLamp.cs new file mode 100644 index 0000000..fe2e87b --- /dev/null +++ b/AutoGen/WorldObject/TallowLamp.cs @@ -0,0 +1,114 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class TallowLampObject : + WorldObject + { + public override string FriendlyName { get { return "Tallow Lamp"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(TallowItem), + typeof(OilItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(TallowLampItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class TallowLampItem : WorldObjectItem + { + public override string FriendlyName { get { return "Tallow Lamp"; } } + public override string Description { get { return "A pottery lamp. Fuel with tallow."; } } + + static TallowLampItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + TypeForRoomLimit = "Lights", + };}} + } + + + [RequiresSkill(typeof(StoneworkingSkill), 1)] + public partial class TallowLampRecipe : Recipe + { + public TallowLampRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(StoneworkingEfficiencySkill), 4, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 2, StoneworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(StoneworkingEfficiencySkill), 2, StoneworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(2, StoneworkingSpeedSkill.MultiplicativeStrategy, typeof(StoneworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(TallowLampRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Tallow Lamp", typeof(TallowLampRecipe)); + CraftingComponent.AddRecipe(typeof(KilnObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/TallowWallLamp.cs b/AutoGen/WorldObject/TallowWallLamp.cs new file mode 100644 index 0000000..bf41641 --- /dev/null +++ b/AutoGen/WorldObject/TallowWallLamp.cs @@ -0,0 +1,116 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class TallowWallLampObject : + WorldObject + { + public override string FriendlyName { get { return "Tallow Wall Lamp"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(TallowItem), + typeof(OilItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(TallowWallLampItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class TallowWallLampItem : WorldObjectItem + { + public override string FriendlyName { get { return "Tallow Wall Lamp"; } } + public override string Description { get { return "A candle mounted on a wall bracket which can burn tallow to produce a small amount of light."; } } + + static TallowWallLampItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 2)] + public partial class TallowWallLampRecipe : Recipe + { + public TallowWallLampRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 2, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 2, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(TallowWallLampRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Tallow Wall Lamp", typeof(TallowWallLampRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/TorchStand.cs b/AutoGen/WorldObject/TorchStand.cs new file mode 100644 index 0000000..6d63980 --- /dev/null +++ b/AutoGen/WorldObject/TorchStand.cs @@ -0,0 +1,116 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class TorchStandObject : + WorldObject + { + public override string FriendlyName { get { return "Torch Stand"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(TorchItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(0.5f); + this.GetComponent().Set(TorchStandItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class TorchStandItem : WorldObjectItem + { + public override string FriendlyName { get { return "Torch Stand"; } } + public override string Description { get { return "A stand for a torch."; } } + + static TorchStandItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 1, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 1)] + public partial class TorchStandRecipe : Recipe + { + public TorchStandRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 10, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 5, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(2, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(TorchStandRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Torch Stand", typeof(TorchStandRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/WainwrightTable.cs b/AutoGen/WorldObject/WainwrightTable.cs new file mode 100644 index 0000000..589e156 --- /dev/null +++ b/AutoGen/WorldObject/WainwrightTable.cs @@ -0,0 +1,103 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + [RequireComponent(typeof(RoomRequirementsComponent))] + [RequireRoomContainment] + [RequireRoomVolume(25)] + [RequireRoomMaterialTier(1, 18)] + public partial class WainwrightTableObject : + WorldObject + { + public override string FriendlyName { get { return "Wainwright Table"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WainwrightTableItem : WorldObjectItem + { + public override string FriendlyName { get { return "Wainwright Table"; } } + public override string Description { get { return "A set of smoothing and woodworking tools that assist in creating wheels and transportation."; } } + + static WainwrightTableItem() + { + + } + + } + + + [RequiresSkill(typeof(WoodworkingSkill), 0)] + public partial class WainwrightTableRecipe : Recipe + { + public WainwrightTableRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 50, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 40, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 25, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WainwrightTableRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Wainwright Table", typeof(WainwrightTableRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/WallCandle.cs b/AutoGen/WorldObject/WallCandle.cs new file mode 100644 index 0000000..d6076d6 --- /dev/null +++ b/AutoGen/WorldObject/WallCandle.cs @@ -0,0 +1,116 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(FuelSupplyComponent))] + [RequireComponent(typeof(FuelConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class WallCandleObject : + WorldObject + { + public override string FriendlyName { get { return "Wall Candle"; } } + + private static Type[] fuelTypeList = new Type[] + { + typeof(TallowItem), + typeof(OilItem), + }; + + protected override void Initialize() + { + this.GetComponent().Initialize("Lights"); + this.GetComponent().Initialize(2, fuelTypeList); + this.GetComponent().Initialize(1); + this.GetComponent().Set(WallCandleItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WallCandleItem : WorldObjectItem + { + public override string FriendlyName { get { return "Wall Candle"; } } + public override string Description { get { return "A wall mounted candle."; } } + + static WallCandleItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "General", + Val = 2, + TypeForRoomLimit = "Lights", + DiminishingReturnPercent = 0.8f + };}} + } + + + [RequiresSkill(typeof(MetalworkingSkill), 3)] + public partial class WallCandleRecipe : Recipe + { + public WallCandleRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 2, MetalworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MetalworkingEfficiencySkill), 2, MetalworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WallCandleRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Wall Candle", typeof(WallCandleRecipe)); + CraftingComponent.AddRecipe(typeof(AnvilObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Washboard.cs b/AutoGen/WorldObject/Washboard.cs new file mode 100644 index 0000000..d0d1874 --- /dev/null +++ b/AutoGen/WorldObject/Washboard.cs @@ -0,0 +1,105 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class WashboardObject : + WorldObject + { + public override string FriendlyName { get { return "Washboard"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Set(WashboardItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WashboardItem : WorldObjectItem + { + public override string FriendlyName { get { return "Washboard"; } } + public override string Description { get { return "Sometimes it can be nice to have clean clothes."; } } + + static WashboardItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Bathroom", + Val = 2, + TypeForRoomLimit = "Washing", + DiminishingReturnPercent = 0.5f + };}} + } + + + [RequiresSkill(typeof(ClothProductionSkill), 1)] + public partial class WashboardRecipe : Recipe + { + public WashboardRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(ClothProductionEfficiencySkill), 10, ClothProductionEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, ClothProductionSpeedSkill.MultiplicativeStrategy, typeof(ClothProductionSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WashboardRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Washboard", typeof(WashboardRecipe)); + CraftingComponent.AddRecipe(typeof(TailoringTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/WashingMachine.cs b/AutoGen/WorldObject/WashingMachine.cs new file mode 100644 index 0000000..f3912fc --- /dev/null +++ b/AutoGen/WorldObject/WashingMachine.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerConsumptionComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class WashingMachineObject : + WorldObject + { + public override string FriendlyName { get { return "Washing Machine"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Housing"); + this.GetComponent().Initialize(100); + this.GetComponent().Initialize(10, new ElectricPower()); + this.GetComponent().Set(WashingMachineItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WashingMachineItem : WorldObjectItem + { + public override string FriendlyName { get { return "Washing Machine"; } } + public override string Description { get { return "Why hand scrub your clothes on a washboard when you could throw them into this magical cleaning machine?"; } } + + static WashingMachineItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Bathroom", + Val = 20, + TypeForRoomLimit = "Washing", + DiminishingReturnPercent = 0.3f + };}} + } + + + [RequiresSkill(typeof(IndustrialEngineeringSkill), 3)] + public partial class WashingMachineRecipe : Recipe + { + public WashingMachineRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 20, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 15, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(IndustrialEngineeringEfficiencySkill), 5, IndustrialEngineeringEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(10, IndustrialEngineeringSpeedSkill.MultiplicativeStrategy, typeof(IndustrialEngineeringSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WashingMachineRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Washing Machine", typeof(WashingMachineRecipe)); + CraftingComponent.AddRecipe(typeof(FactoryObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Waterwheel.cs b/AutoGen/WorldObject/Waterwheel.cs new file mode 100644 index 0000000..300f0bd --- /dev/null +++ b/AutoGen/WorldObject/Waterwheel.cs @@ -0,0 +1,106 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerGeneratorComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class WaterwheelObject : + WorldObject + { + public override string FriendlyName { get { return "Waterwheel"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Power"); + this.GetComponent().Initialize(10, new MechanicalPower()); + this.GetComponent().Initialize(200); + this.GetComponent().Set(WaterwheelItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WaterwheelItem : WorldObjectItem + { + public override string FriendlyName { get { return "Waterwheel"; } } + public override string Description { get { return "Use the power of flowing water to produce mechanical power."; } } + + static WaterwheelItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(PrimitiveMechanicsSkill), 2)] + public partial class WaterwheelRecipe : Recipe + { + public WaterwheelRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(PrimitiveMechanicsEfficiencySkill), 20, PrimitiveMechanicsEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(30, PrimitiveMechanicsSpeedSkill.MultiplicativeStrategy, typeof(PrimitiveMechanicsSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WaterwheelRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Waterwheel", typeof(WaterwheelRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/WindTurbine.cs b/AutoGen/WorldObject/WindTurbine.cs new file mode 100644 index 0000000..cdb2f4d --- /dev/null +++ b/AutoGen/WorldObject/WindTurbine.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + [RequireComponent(typeof(OnOffComponent))] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerGeneratorComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class WindTurbineObject : + WorldObject + { + public override string FriendlyName { get { return "Wind Turbine"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Power"); + this.GetComponent().Initialize(30, new ElectricPower()); + this.GetComponent().Initialize(750); + this.GetComponent().Set(WindTurbineItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WindTurbineItem : WorldObjectItem + { + public override string FriendlyName { get { return "Wind Turbine"; } } + public override string Description { get { return "Generates electrical power from the wind."; } } + + static WindTurbineItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(MechanicalEngineeringSkill), 4)] + public partial class WindTurbineRecipe : Recipe + { + public WindTurbineRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 15, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 15, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 10, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 10, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(MechanicsAssemblyEfficiencySkill), 4, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(50, MechanicsAssemblySpeedSkill.MultiplicativeStrategy, typeof(MechanicsAssemblySpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WindTurbineRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Wind Turbine", typeof(WindTurbineRecipe)); + CraftingComponent.AddRecipe(typeof(MachineShopObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Windmill.cs b/AutoGen/WorldObject/Windmill.cs new file mode 100644 index 0000000..a4b02ed --- /dev/null +++ b/AutoGen/WorldObject/Windmill.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(PowerGridComponent))] + [RequireComponent(typeof(PowerGeneratorComponent))] + [RequireComponent(typeof(HousingComponent))] + public partial class WindmillObject : + WorldObject + { + public override string FriendlyName { get { return "Windmill"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Power"); + this.GetComponent().Initialize(10, new MechanicalPower()); + this.GetComponent().Initialize(200); + this.GetComponent().Set(WindmillItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WindmillItem : WorldObjectItem + { + public override string FriendlyName { get { return "Windmill"; } } + public override string Description { get { return "Use wind to produce mechanical power."; } } + + static WindmillItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Industrial", + TypeForRoomLimit = "", + };}} + } + + + [RequiresSkill(typeof(PrimitiveMechanicsSkill), 3)] + public partial class WindmillRecipe : Recipe + { + public WindmillRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(PrimitiveMechanicsEfficiencySkill), 15, PrimitiveMechanicsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(PrimitiveMechanicsEfficiencySkill), 5, PrimitiveMechanicsEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(PrimitiveMechanicsEfficiencySkill), 10, PrimitiveMechanicsEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(30, PrimitiveMechanicsSpeedSkill.MultiplicativeStrategy, typeof(PrimitiveMechanicsSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WindmillRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Windmill", typeof(WindmillRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/WoodSign.cs b/AutoGen/WorldObject/WoodSign.cs new file mode 100644 index 0000000..13a149d --- /dev/null +++ b/AutoGen/WorldObject/WoodSign.cs @@ -0,0 +1,97 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + public partial class WoodSignObject : + WorldObject + { + public override string FriendlyName { get { return "Wood Sign"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Misc"); + + + + this.AddAsPOI("Marker"); + } + + public override void Destroy() + { + base.Destroy(); + this.RemoveAsPOI("Marker"); + } + + } + + [Serialized] + public partial class WoodSignItem : WorldObjectItem + { + public override string FriendlyName { get { return "Wood Sign"; } } + public override string Description { get { return "A large sign for all your large text needs!"; } } + + static WoodSignItem() + { + + } + + } + + + [RequiresSkill(typeof(LumberWoodworkingSkill), 1)] + public partial class WoodSignRecipe : Recipe + { + public WoodSignRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 4, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 4, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(1, LumberWoodworkingSpeedSkill.MultiplicativeStrategy, typeof(LumberWoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WoodSignRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Wood Sign", typeof(WoodSignRecipe)); + CraftingComponent.AddRecipe(typeof(SawmillObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/WoodenFabricBed.cs b/AutoGen/WorldObject/WoodenFabricBed.cs new file mode 100644 index 0000000..022f356 --- /dev/null +++ b/AutoGen/WorldObject/WoodenFabricBed.cs @@ -0,0 +1,107 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class WoodenFabricBedObject : + WorldObject + { + public override string FriendlyName { get { return "Wooden Fabric Bed"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Misc"); + this.GetComponent().Set(WoodenFabricBedItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WoodenFabricBedItem : WorldObjectItem + { + public override string FriendlyName { get { return "Wooden Fabric Bed"; } } + public override string Description { get { return "A much more comfortable bed made with fabric."; } } + + static WoodenFabricBedItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Bedroom", + Val = 4, + TypeForRoomLimit = "Bed", + DiminishingReturnPercent = 0.4f + };}} + } + + + [RequiresSkill(typeof(LumberWoodworkingSkill), 4)] + public partial class WoodenFabricBedRecipe : Recipe + { + public WoodenFabricBedRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 20, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 20, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(LumberWoodworkingEfficiencySkill), 5, LumberWoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, LumberWoodworkingSpeedSkill.MultiplicativeStrategy, typeof(LumberWoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WoodenFabricBedRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Wooden Fabric Bed", typeof(WoodenFabricBedRecipe)); + CraftingComponent.AddRecipe(typeof(SawmillObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/WoodenStrawBed.cs b/AutoGen/WorldObject/WoodenStrawBed.cs new file mode 100644 index 0000000..c18ed6d --- /dev/null +++ b/AutoGen/WorldObject/WoodenStrawBed.cs @@ -0,0 +1,107 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(HousingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class WoodenStrawBedObject : + WorldObject + { + public override string FriendlyName { get { return "Wooden Straw Bed"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Misc"); + this.GetComponent().Set(WoodenStrawBedItem.HousingVal); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WoodenStrawBedItem : WorldObjectItem + { + public override string FriendlyName { get { return "Wooden Straw Bed"; } } + public override string Description { get { return "A nice, scratchy and horrible uncomfortable bed. But at least it keeps you off the ground."; } } + + static WoodenStrawBedItem() + { + + } + + [TooltipChildren] public HousingValue HousingTooltip { get { return HousingVal; } } + [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue() + { + Category = "Bedroom", + Val = 2, + TypeForRoomLimit = "Bed", + DiminishingReturnPercent = 0.4f + };}} + } + + + [RequiresSkill(typeof(WoodworkingSkill), 3)] + public partial class WoodenStrawBedRecipe : Recipe + { + public WoodenStrawBedRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(WoodworkingEfficiencySkill), 10, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, WoodworkingSpeedSkill.MultiplicativeStrategy, typeof(WoodworkingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WoodenStrawBedRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Wooden Straw Bed", typeof(WoodenStrawBedRecipe)); + CraftingComponent.AddRecipe(typeof(CarpentryTableObject), this); + } + } +} \ No newline at end of file diff --git a/AutoGen/WorldObject/Workbench.cs b/AutoGen/WorldObject/Workbench.cs new file mode 100644 index 0000000..c7c2069 --- /dev/null +++ b/AutoGen/WorldObject/Workbench.cs @@ -0,0 +1,98 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using Eco.Gameplay.Blocks; + using Eco.Gameplay.Components; + using Eco.Gameplay.Components.Auth; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Economy; + using Eco.Gameplay.Housing; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Minimap; + using Eco.Gameplay.Objects; + using Eco.Gameplay.Players; + using Eco.Gameplay.Property; + using Eco.Gameplay.Skills; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Gameplay.Pipes.LiquidComponents; + using Eco.Gameplay.Pipes.Gases; + using Eco.Gameplay.Systems.Tooltip; + using Eco.Shared; + using Eco.Shared.Math; + using Eco.Shared.Localization; + using Eco.Shared.Serialization; + using Eco.Shared.Utils; + using Eco.Shared.View; + using Eco.Shared.Items; + using Eco.Gameplay.Pipes; + using Eco.World.Blocks; + + [Serialized] + + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(MinimapComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(CraftingComponent))] + [RequireComponent(typeof(SolidGroundComponent))] + public partial class WorkbenchObject : + WorldObject + { + public override string FriendlyName { get { return "Workbench"; } } + + + protected override void Initialize() + { + this.GetComponent().Initialize("Crafting"); + + + + } + + public override void Destroy() + { + base.Destroy(); + } + + } + + [Serialized] + public partial class WorkbenchItem : WorldObjectItem + { + public override string FriendlyName { get { return "Workbench"; } } + public override string Description { get { return "A bench for the basics and making even more benches."; } } + + static WorkbenchItem() + { + + } + + } + + + [RequiresSkill(typeof(BasicCraftingSkill), 0)] + public partial class WorkbenchRecipe : Recipe + { + public WorkbenchRecipe() + { + this.Products = new CraftingElement[] + { + new CraftingElement(), + }; + + this.Ingredients = new CraftingElement[] + { + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 30, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + new CraftingElement(typeof(BasicCraftingEfficiencySkill), 20, BasicCraftingEfficiencySkill.MultiplicativeStrategy), + }; + SkillModifiedValue value = new SkillModifiedValue(5, BasicCraftingSpeedSkill.MultiplicativeStrategy, typeof(BasicCraftingSpeedSkill), Localizer.Do("craft time")); + SkillModifiedValueManager.AddBenefitForObject(typeof(WorkbenchRecipe), Item.Get().UILink(), value); + SkillModifiedValueManager.AddSkillBenefit(Item.Get().UILink(), value); + this.CraftMinutes = value; + this.Initialize("Workbench", typeof(WorkbenchRecipe)); + CraftingComponent.AddRecipe(typeof(WorkbenchObject), this); + } + } +} \ No newline at end of file diff --git a/Items/Tailings.cs b/Items/Tailings.cs new file mode 100644 index 0000000..5e2ed0c --- /dev/null +++ b/Items/Tailings.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + using System; + using System.ComponentModel; + using Eco.Gameplay.Items; + using Eco.Shared.Math; + using Eco.World.Blocks; + using Eco.Shared.Serialization; + using Eco.Simulation.WorldLayers; + using Eco.Gameplay.Pipes; + using Eco.Gameplay.Items.SearchAndSelect; + using World = World.World; + + // To be honest, most of these should probably be removed from Tailing.cs, but they're here for now. + [Serialized] + [Weight(30000)] + [MaxStackSize(20)] + [RequiresTool(typeof(ShovelItem))] + [MakesRoads] + public class DirtItem : BlockItem, ICanExitFromPipe + { + public override string FriendlyName { get { return "Dirt"; } } + public override string FriendlyNamePlural { get { return "Dirt"; } } + public override bool CanStickToWalls { get { return false; } } + + public string FlowTooltip(float flowrate) { return null; } + + public int OnPipeExit(Ray posDir, int amount) + { + // need a pyramid check, but for now just do down + var existingBlock = World.GetBlock(posDir.FirstPos) as EmptyBlock; + if (existingBlock != null) + { + var target = World.FindPyramidPos(posDir.FirstPos); + World.SetBlock(this.OriginType, target); + return 1; + } + return 0; + } + } + + [Serialized] + [Weight(30000)] + [MaxStackSize(20)] + [RequiresTool(typeof(ShovelItem))] + public class SandItem : BlockItem + { + public override string FriendlyName { get { return "Sand"; } } + public override string FriendlyNamePlural { get { return "Sand"; } } + public override bool CanStickToWalls { get { return false; } } + } + + [Serialized, Liquid] + [Category("Hidden")] + [MaxStackSize(10)] + public class WaterItem : BlockItem, ICanExitFromPipe + { + public override bool CanStickToWalls { get { return false; } } + public string FlowTooltip(float flowrate) { return null; } + + public int OnPipeExit(Ray posDir, int amount) + { + var pos = posDir.FirstPos; + var toSet = Math.Min(amount, 1000); + var existingBlock = World.GetBlock(pos); + if (!(existingBlock is EmptyBlock) && !(existingBlock is WaterBlock)) + return 0; + + // Set the existing block if it's there, or add a new block. + if (existingBlock is EmptyBlock) + existingBlock = World.SetBlock(typeof(WaterBlock), pos, toSet * 0.001f) as WaterBlock; + + var waterBlock = existingBlock as WaterBlock; + if (waterBlock.Water < toSet) + { + waterBlock.Water = toSet; + World.WakeUp(pos); + } + waterBlock.PipeSupplied = true; + return toSet; + } + } + + + [Serialized, Liquid] + [Category("Hidden")] + public class SewageItem : BlockItem, ICanExitFromPipe + { + public override string FriendlyName { get { return "Sewage"; } } + public override string FriendlyNamePlural { get { return "Sewage"; } } + public override bool CanStickToWalls { get { return false; } } + public string FlowTooltip(float flowrate) { return null; } + + + public int OnPipeExit(Ray posDir, int amount) + { + WorldLayerManager.ClimateSim.AddGroundPollution(posDir.FirstPos.XZ, amount); + return amount; + } + } + + [Serialized, Weight(30000), StartsDiscovered] + [MaxStackSize(20)] + [RequiresTool(typeof(ShovelItem))] + public class TailingsItem : BlockItem + { + public override string FriendlyName { get { return "Tailings"; } } + public override string FriendlyNamePlural { get { return "Tailings"; } } + public override string Description { get { return "Waste product from smelting. When left on soil the run-off will create pollution; killing nearby plants and seeping into the water supply. Contain in buildings or bury in rock to neutralize."; } } + public override bool CanStickToWalls { get { return false; } } + } +} \ No newline at end of file diff --git a/KirthosMods/BetterLoggingProfession/BetterLoggingProfession.unity3d b/KirthosMods/BetterLoggingProfession/BetterLoggingProfession.unity3d new file mode 100644 index 0000000..768a1a0 Binary files /dev/null and b/KirthosMods/BetterLoggingProfession/BetterLoggingProfession.unity3d differ diff --git a/KirthosMods/BetterLoggingProfession/LoggingsSkill.cs b/KirthosMods/BetterLoggingProfession/LoggingsSkill.cs new file mode 100644 index 0000000..dec13f2 --- /dev/null +++ b/KirthosMods/BetterLoggingProfession/LoggingsSkill.cs @@ -0,0 +1,51 @@ +using Eco.Gameplay.Skills; +using Eco.Mods.TechTree; +using Eco.Shared.Serialization; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Kirthos.Mods +{ + [Serialized] + [RequiresSkill(typeof(LoggingSkill), 1)] + public partial class WoodPulpCleanerSkill : Skill + { + public override string FriendlyName { get { return "Wood pulp cleaner"; } } + public override string Description { get { return "When break a wood pulp, break others wood pulp around. Levels increase range."; } } + + public static int[] SkillPointCost = { 5, 10, 20, 30, 40 }; + public override int RequiredPoint { get { return this.Level < this.MaxLevel ? SkillPointCost[this.Level] : 0; } } + public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < this.MaxLevel ? SkillPointCost[this.Level - 1] : 0; } } + public override int MaxLevel { get { return 5; } } + } + //* + [Serialized] + [RequiresSkill(typeof(WoodPulpCleanerSkill), 1)] + public partial class StumpCleanerSkill : Skill + { + public override string FriendlyName { get { return "Stump cleaner"; } } + public override string Description { get { return "Break tree stump in one hit."; } } + + public static int[] SkillPointCost = { 75}; + public override int RequiredPoint { get { return this.Level < this.MaxLevel ? SkillPointCost[this.Level] : 0; } } + public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < this.MaxLevel ? SkillPointCost[this.Level - 1] : 0; } } + public override int MaxLevel { get { return 1; } } + } + //*/ + [Serialized] + [RequiresSkill(typeof(LoggingSkill), 1)] + public partial class ExpertLumbererSkill : Skill + { + public override string FriendlyName { get { return "Expert lumberer"; } } + public override string Description { get { return "Cut the tree trunk, ready to harvest."; } } + + public static int[] SkillPointCost = { 80 }; + public override int RequiredPoint { get { return this.Level < this.MaxLevel ? SkillPointCost[this.Level] : 0; } } + public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < this.MaxLevel ? SkillPointCost[this.Level - 1] : 0; } } + public override int MaxLevel { get { return 1; } } + } + +} diff --git a/KirthosMods/BetterMining/BetterMining.unity3d b/KirthosMods/BetterMining/BetterMining.unity3d new file mode 100644 index 0000000..0e3024a Binary files /dev/null and b/KirthosMods/BetterMining/BetterMining.unity3d differ diff --git a/KirthosMods/BetterMining/MiningSkills.cs b/KirthosMods/BetterMining/MiningSkills.cs new file mode 100644 index 0000000..f34956d --- /dev/null +++ b/KirthosMods/BetterMining/MiningSkills.cs @@ -0,0 +1,52 @@ +using Eco.Gameplay.DynamicValues; +using Eco.Gameplay.Players; +using Eco.Gameplay.Skills; +using Eco.Mods.TechTree; +using Eco.Shared.Serialization; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Kirthos.Mods +{ + [Serialized] + [RequiresSkill(typeof(MiningSkill), 1)] + public partial class MiningPickupAmountSkill : Skill + { + public override string FriendlyName { get { return "Mining Pickup amount"; } } + public override string Description { get { return "Pickup near rubble when right-click rubble with pickaxe. Levels increase max amount."; } } + + public static int[] SkillPointCost = { 5, 7, 14, 22, 30 }; + public override int RequiredPoint { get { return this.Level < this.MaxLevel ? SkillPointCost[this.Level] : 0; } } + public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < this.MaxLevel ? SkillPointCost[this.Level - 1] : 0; } } + public override int MaxLevel { get { return 5; } } + } + + [Serialized] + [RequiresSkill(typeof(MiningPickupAmountSkill), 1)] + public partial class MiningPickupRangeSkill : Skill + { + public override string FriendlyName { get { return "Mining Pickup range"; } } + public override string Description { get { return "Increase the range of the mining pickup."; } } + + public static int[] SkillPointCost = { 5, 7, 14, 22, 30 }; + public override int RequiredPoint { get { return this.Level < this.MaxLevel ? SkillPointCost[this.Level] : 0; } } + public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < this.MaxLevel ? SkillPointCost[this.Level - 1] : 0; } } + public override int MaxLevel { get { return 5; } } + } + + [Serialized] + [RequiresSkill(typeof(MiningSkill), 1)] + public partial class StrongMiningSkill : Skill + { + public override string FriendlyName { get { return "Strong Mining"; } } + public override string Description { get { return "Have chance to break directly big rubble when mine blocks. (20% chance per level)"; } } + + public static int[] SkillPointCost = { 5, 7, 14, 22, 30 }; + public override int RequiredPoint { get { return this.Level < this.MaxLevel ? SkillPointCost[this.Level] : 0; } } + public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < this.MaxLevel ? SkillPointCost[this.Level - 1] : 0; } } + public override int MaxLevel { get { return 5; } } + } +} diff --git a/KirthosMods/Utils/RubbleUtils.cs b/KirthosMods/Utils/RubbleUtils.cs new file mode 100644 index 0000000..fe8ba75 --- /dev/null +++ b/KirthosMods/Utils/RubbleUtils.cs @@ -0,0 +1,154 @@ +using Eco.Gameplay.Interactions; +using Eco.Gameplay.Items; +using Eco.Gameplay.Objects; +using Eco.Gameplay.Players; +using Eco.Gameplay.Systems.Chat; +using Eco.Mods.TechTree; +using Eco.Shared.Math; +using Eco.Shared.Networking; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Kirthos.Mods +{ + class RubbleUtils + { + public static void PickUpRubble(User user, int range = 10, int qty = 20) + { + try + { + VerifyCarry(user.Inventory.Carried, user, range, qty); + } + catch(Exception) + { + + } + } + + private static void PickRubble(User user, int range, int qty) where T : RubbleObject + { + Type firstItemGet = null; + Type itemType = null; + int count = user.Inventory.Carried.Stacks.First().Quantity; + if (count >= qty) + return; + foreach (RubbleObject obj in NetObjectManager.GetObjectsOfType()) + { + if (obj.IsBreakable) + { + continue; + } + if (Vector3.Distance(user.Position, obj.Position) < range) + { + if (firstItemGet == null) + { + firstItemGet = obj.GetType(); + if (firstItemGet.ToString().Contains("StoneRubbleSet")) + { + itemType = typeof(StoneItem); + } + else if (firstItemGet.ToString().Contains("CoalRubbleSet")) + { + itemType = typeof(CoalItem); + } + else if (firstItemGet.ToString().Contains("CopperOreRubbleSet")) + { + itemType = typeof(CopperOreItem); + } + else if (firstItemGet.ToString().Contains("GoldOreRubbleSet")) + { + itemType = typeof(GoldOreItem); + } + else if (firstItemGet.ToString().Contains("IronOreRubbleSet")) + { + itemType = typeof(IronOreItem); + } + } + if (itemType == typeof(StoneItem) && !obj.GetType().ToString().Contains("StoneRubbleSet")) + { + continue; + } + else if (itemType == typeof(CoalItem) && !obj.GetType().ToString().Contains("CoalRubbleSet")) + { + continue; + } + else if (itemType == typeof(CopperOreItem) && !obj.GetType().ToString().Contains("CopperOreRubbleSet")) + { + continue; + } + else if (itemType == typeof(GoldOreItem) && !obj.GetType().ToString().Contains("GoldOreRubbleSet")) + { + continue; + } + else if (itemType == typeof(IronOreItem) && !obj.GetType().ToString().Contains("IronOreRubbleSet")) + { + continue; + } + if (obj.AuthorizedToInteract(user)) + { + if (obj.TryPickup(user.Inventory).IsSuccess) + { + count++; + if (count >= qty) + break; + } + } + } + } + } + + private static void VerifyCarry(LimitedInventory carry, User user, int range, int qty) + { + if (carry.IsEmpty) + { + PickRubble(user, range, qty); + } + else + { + Item itemCarried = carry.Stacks.First().Item; + if (itemCarried is StoneItem) + { + PickRubble>(user, range, qty); + } + else if (itemCarried is CoalItem) + { + PickRubble>(user, range, qty); + } + else if (itemCarried is CopperOreItem) + { + PickRubble>(user, range, qty); + } + else if (itemCarried is GoldOreItem) + { + PickRubble>(user, range, qty); + } + else if (itemCarried is IronOreItem) + { + PickRubble>(user, range, qty); + } + } + } + + public static void BreakBigRubble(Vector3i blockPosition, int percent) + { + Random rng = new Random(); + if (rng.Next(100) < percent) + { + foreach (RubbleObject obj in NetObjectManager.GetObjectsOfType()) + { + if (!obj.IsBreakable) + { + continue; + } + if (Vector3.Distance(blockPosition, obj.Position) < 1) + { + obj.Breakup(); + } + } + } + } + } +} diff --git a/KirthosMods/Utils/SkillsUtil.cs b/KirthosMods/Utils/SkillsUtil.cs new file mode 100644 index 0000000..2e53cb0 --- /dev/null +++ b/KirthosMods/Utils/SkillsUtil.cs @@ -0,0 +1,40 @@ +using Eco.Gameplay.Players; +using Eco.Gameplay.Skills; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Kirthos.Mods +{ + class SkillsUtil + { + public static bool HasSkillLevel(User user, Type skillType, int level) + { + foreach(Skill skill in user.Skillset.Skills) + { + if (skill.Type == skillType) + { + if (skill.Level >= level) + { + return true; + } + } + } + return false; + } + + public static int GetSkillLevel(User user, Type skillType) + { + foreach (Skill skill in user.Skillset.Skills) + { + if (skill.Type == skillType) + { + return skill.Level; + } + } + return 0; + } + } +} diff --git a/KirthosMods/Utils/TreeUtils.cs b/KirthosMods/Utils/TreeUtils.cs new file mode 100644 index 0000000..e8460e8 --- /dev/null +++ b/KirthosMods/Utils/TreeUtils.cs @@ -0,0 +1,47 @@ +using Eco.Gameplay.Items; +using Eco.Gameplay.Players; +using Eco.Mods.TechTree; +using Eco.Shared.Math; +using Eco.World; +using Eco.World.Blocks; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Kirthos.Mods +{ + class TreeUtils + { + public static void GetPulpAroundPoint(User user, Vector3i position, int range) + { + try + { + for (int i = -range; i < range; i++) + { + for (int j = -range; j < range; j++) + { + if (i == 0 && j == 0) continue; + Vector3i positionAbove = World.GetTopPos(new Vector2i(position.x + i, position.z + j)) + Vector3i.Up; + Block blockAbove = World.GetBlockProbablyTop(positionAbove); + if (blockAbove.Is()) + { + if (positionAbove != position && Vector3i.Distance(positionAbove, position) < range) + { + if (user.Inventory.TryAddItems(5)) + { + World.DeleteBlock(positionAbove); + } + } + } + } + } + } + catch(Exception) + { + + } + } + } +} diff --git a/Objects/StockpileObject.cs b/Objects/StockpileObject.cs new file mode 100644 index 0000000..bf0c345 --- /dev/null +++ b/Objects/StockpileObject.cs @@ -0,0 +1,62 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. + +namespace Eco.Mods.TechTree +{ + using Eco.Gameplay.Components; + using Eco.Gameplay.Objects; + using Gameplay.Components.Auth; + using Gameplay.Players; + using Shared.Math; + using Gameplay.Items; + using Shared.Serialization; + using World = Eco.World.World; + using World.Blocks; + using Shared.Networking; + + public partial class StockpileItem : WorldObjectItem + { + public override bool TryPlaceObject(Player player, Vector3i position, Quaternion rotation) + { + Vector3i startPosition = position - new Vector3i((int)(StockpileComponent.Dimensions.x / 2f), 1, (int)(StockpileComponent.Dimensions.z / 2f)); + foreach (var offset in StockpileComponent.Dimensions.XZ.XYIter()) + { + var worldPos = startPosition + offset.X_Z(); + if (!World.GetBlock(worldPos).Is()) + { + player.SendTemporaryErrorLoc("Stockpile requires solid ground to be placed on."); + return false; + } + } + return base.TryPlaceObject(player, position, rotation); + } + } + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(StockpileComponent))] + [RequireComponent(typeof(LinkComponent))] + public partial class StockpileObject : WorldObject + { + public override string FriendlyName { get { return "Stockpile"; } } + + protected override void Initialize() + { + base.Initialize(); + + var storage = this.GetComponent(); + storage.Initialize(StockpileComponent.Dimensions.x * StockpileComponent.Dimensions.z); + storage.Storage.AddRestriction(new CarriedRestriction()); // restrict stockpiles to carried items. + + this.GetComponent().Initialize(AuthModeType.Inherited); + this.GetComponent().Initialize(10); + } + + public override void SendInitialState(BSONObject bsonObj, INetObjectViewer viewer) + { + base.SendInitialState(bsonObj, viewer); + bsonObj["noFadeIn"] = true; + } + } +} diff --git a/Objects/StorageChestObject.cs b/Objects/StorageChestObject.cs new file mode 100644 index 0000000..e16036a --- /dev/null +++ b/Objects/StorageChestObject.cs @@ -0,0 +1,44 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. + +namespace Eco.Mods.TechTree +{ + using Eco.Gameplay.Components; + using Eco.Gameplay.Items; + using Eco.Gameplay.Objects; + using Eco.Shared.Serialization; + using Eco.Gameplay.Components.Auth; + + public partial class StorageChestObject : WorldObject + { + protected override void PostInitialize() + { + base.PostInitialize(); + this.GetComponent().Initialize(AuthModeType.Inherited); + this.GetComponent().Initialize(10); + this.GetComponent().Initialize("Storage"); + } + } + + [Serialized] + [RequireComponent(typeof(PropertyAuthComponent))] + [RequireComponent(typeof(PublicStorageComponent))] + [RequireComponent(typeof(LinkComponent))] + [RequireComponent(typeof(MinimapComponent))] + public class BigStorageChestObject : WorldObject + { + public override string FriendlyName { get { return "Big Storage Chest"; } } + + protected override void Initialize() + { + base.Initialize(); + + var storage = this.GetComponent(); + storage.Initialize(32, 8000000); + storage.Storage.AddRestriction(new NotCarriedRestriction()); // can't store block or large items + this.GetComponent().Initialize(AuthModeType.Inherited); + this.GetComponent().Initialize(10); + this.GetComponent().Initialize("Storage"); + } + } +} diff --git a/Player/PlayerDefaults.cs b/Player/PlayerDefaults.cs new file mode 100644 index 0000000..65942e9 --- /dev/null +++ b/Player/PlayerDefaults.cs @@ -0,0 +1,121 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using Eco.Gameplay.DynamicValues; +using Eco.Gameplay.Items; +using Eco.Gameplay.Items.Actionbar; +using Eco.Gameplay.Players; +using Eco.Mods.TechTree; +using Eco.Shared.Localization; + +// default starting player items / skills +public static class PlayerDefaults +{ + public static Dictionary GetDefaultToolbar() + { + return new Dictionary + { + }; + } + + public static Dictionary GetDefaultInventory() + { + return new Dictionary + { + { typeof(PropertyClaimItem), 40 }, + { typeof(StoneAxeItem), 1 }, + { typeof(WoodenShovelItem), 1 }, + { typeof(StoneHammerItem), 1 }, + { typeof(StonePickaxeItem), 1 }, + { typeof(WorkbenchItem), 1 }, + }; + } + + public static IEnumerable GetDefaultSkills() + { + return new Type[] + { + typeof(CarpenterSkill), + typeof(LoggingSkill), + typeof(HewingSkill), + typeof(MasonSkill), + typeof(MiningSkill), + typeof(MortaringSkill), + typeof(ChefSkill), + typeof(CampfireSkill), + typeof(FarmerSkill), + typeof(DiggingSkill), + typeof(GatheringSkill), + typeof(HunterSkill), + typeof(HuntingSkill), + typeof(SmithSkill), + typeof(EngineerSkill), + typeof(SurvivalistSkill), + typeof(TailorSkill), + typeof(SelfImprovementSkill) + }; + } + + static Dictionary dynamicValuesDictionary = new Dictionary() + { + { + UserStatType.MaxCalories, new MultiDynamicValue(MultiDynamicOps.Sum, + CreateSmv(0f, BigStomachSkill.AdditiveStrategy, typeof(BigStomachSkill), Localizer.Do("maximum calories")), + new ConstantValue(3000)) + }, + { + UserStatType.MaxCarryWeight, new MultiDynamicValue(MultiDynamicOps.Sum, + CreateSmv(0f, new BonusUnitsDecoratorStrategy(StrongBackSkill.AdditiveStrategy, "kg", (float val) => val/1000f), typeof(StrongBackSkill), Localizer.Do("carry weight")), + new ConstantValue(ToolbarBackpackInventory.DefaultWeightLimit)) + }, + { + UserStatType.CalorieRate, new MultiDynamicValue(MultiDynamicOps.Sum, + CreateSmv(1f, CalorieEfficiencySkill.MultiplicativeStrategy, typeof(CalorieEfficiencySkill), Localizer.Do("calorie cost")), + new ConstantValue(0)) + }, + { + UserStatType.DetectionRange, new MultiDynamicValue(MultiDynamicOps.Sum, + CreateSmv(0f, PredatoryInstinctsSkill.AdditiveStrategy, typeof(PredatoryInstinctsSkill), Localizer.Do("how close you can approach animals")), + new ConstantValue(0)) + }, + }; + + private static SkillModifiedValue CreateSmv(float startValue, ModificationStrategy strategy, Type skillType, LocString benefitsDescription) + { + SkillModifiedValue smv = new SkillModifiedValue(startValue, strategy, skillType, benefitsDescription); + SkillModifiedValueManager.AddSkillBenefit(Localizer.Do("You"), smv); + return smv; + } + + public static Dictionary GetDefaultDynamicValues() + { + return dynamicValuesDictionary; + } + + public static IEnumerable GetDefaultBodyparts() + { + return new Type[] + { + typeof(RoundedFaceItem), + typeof(BlinkyEyelidsItem), + typeof(FitTorsoItem), + typeof(HumanLimbsItem), + typeof(HipHopHipsItem), + }; + } + + public static IEnumerable GetDefaultClothing() + { + return new Type[] + { + typeof(BasicBackpackItem), + typeof(TrousersItem), + typeof(HenleyItem), + typeof(NormalHairItem), + typeof(TallBootsItem), + typeof(SquareBeltItem), + }; + } +} diff --git a/README.md b/README.md index f84b31e..7678101 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,174 @@ # EcoGSCE-Modpack +Grundlegende Spielveränderung um das Spiel schwieriger zu gestalten und länger zu ziehen. -EinsGeilerHase \ No newline at end of file +Changelog: + +``` +Clothing: +Alle Backpacks - um 10% Tragelast erhöht (Aufgrund der um mehr als 10% gestiegenen Rohstoff Preise) +Workbackpack & Boots - Beschreibung um den Verlust in Prozent des Kalorienverbrauchs ergänzt +Light Backpack & Running Shoes - Beschreibung um die in Prozente erhöhte Laufgeschwindigkeit ergänzt +Work Backpack & Shoes - Caloriereduzierung etwas verringert (War zu viel mit dem Big Stomach Skill) +Kleidung allgemein: Beschreibung verbessert & Ergänzt. Alle vorteile von Kleidungen stehen nun in der Beschreibung. +Backpacks - Wieder IronIngots zum rezept hinzugefügt. Gurte halten in der Regel nicht ohne schnallen + +``` + +``` +Food: +Neue Rezepte hinzugefügt: +Bacon Cheeseburger +Burrito Supreme +Cake, Fish Fillet +Fish Head Soup +Fishsticks +FishTaco +Milk +Oil +Rice Pilaf +Rice Pudding +Spicy Clam Powder +Tunafish Sandwich +Tunfisch Salad +TunaCasserole +``` + +``` +Geänderte Items: +Asphalt Ramp - 3 Dirt hinzugefügt zum Rezept +Asphalt Ramp - 3 Dirt hinzugefügt zum Rezept +Asphalt Ramp +Asphalt Geänderte Items: +Road - 1 Dirt hinzugefügt zum Rezept +Boards - Brennwert um 500 erhöht +Combustion Engine - 5 Stahl hinzugefügt zum Rezept +Concrete - 25 Wood Pulps hinzugefügt zum Rezept (STC Standard) +Copper Ingots - auf 3 Tailings als Nebenprodukt erhöht (STC Standard) +Gear Box - 5 Eisenbarren im Rezept durch 7 Stahl ersetzt +Gold Ingot - auf 3 Tailings als Nebenprodukt erhöht (STC Standard) +Hewn Logs - Als Brennmaterial hinzugefügt (2000 Kilojoule) +Iron Ingot - auf 3 Tailings als Nebenprodukt erhöht (STC Standard) +IronIngot, CopperIngot & GoldIngot - Ore von 5 auf 25 (Bloomery) und von 4 auf 20 (Blast Furnace) erhöht +Copper Wiring - Output verdoppelt (Da durch diese Mod auch notwendiger) +Steel - 4 Lumber mit 2 Charcoal ersetzt im Rezept +Pistons - 5 Eisenbarren im Rezept durch 10 Stahl ersetzt +Reinforced Concrete - 2 Mortared Stone hinzugefügt im Rezept (STC Standard) +Steel - Eisenbarren auf 6 (+2) erhöt, 4 Lumber und 2 Tailing hinzugefügt im Rezept (STC Standard) +Stone - (Zahlendreher gefixt, hat wieder normales gewicht) +``` +``` +Nahrungsrezepte: +BakedPitch - 10 Wood Pulp durch 20 Dirt ersetzt (STC Standard) +Butcher Bison - Craftingzeit um 3x erhöht (STC Standard) +Campfire Bison - Craftingzeit um 10x erhöht (STC Standard) +Campfire Elk - Craftingzeit um 6,5x erhöht (STC Standard) +Campfire Fox - Craftingzeit um 4x erhöht (STC Standard) +Campfire Hare - Craftingzeit um 2x erhöht (STC Standard) +Campfire Salmon - Craftingzeit um 2,3x erhöht (STC Standard) +Campfire Trout - Craftingzeit um 2,9x erhöht (STC Standard) +Clean Tuna - von Fishingskilleffizienz auf Butcheryskill geändert/Hinzugefügt zum Butcherytable. Craftingzeit um 1x erhöht (STC Standard) +Exotic Fruit Salad - Craftingzeit um 1,5x erhöht (STC Standard) +Exotic Salad - Craftingzeit um 1,5x erhöht (STC Standard) +Exotic Vegetable Medley - Craftingzeit um 1,5x erhöht (STC Standard) +Forest Salad - Craftingzeit um 1,5x erhöht (STC Standard) +Grassland Salad - Craftingzeit um 1,5x erhöht (STC Standard) +Grind Stone to Dirt - Möglichkeit Stone zu Dirt zu verarbeiten hinzugefügt (STC Standard) +Mixed Fruit Salad - Craftingzeit um 1,5x erhöht (STC Standard) +Mixed Salad - Craftingzeit um 1,5x erhöht (STC Standard) +Mixed Vegetable Medley - Craftingzeit um 1,5x erhöht (STC Standard) +``` + +``` +Upgrades: +Upgrade alte Stone/Wooden Tools zu Eisen +Upgrade alte Eisen Tools zu Stahl +Upgrade alte Stahl Tools zu Modern +Stone Roads & Ramps zu Asaphalt +``` + +``` +Vehicle: +Small Wood Cart & Wood Cart - Geschwindigkeit leicht erhöht (Dirt straßen bringen 20% Bonus) +Small Wood Cart - Fixed Max. Ladegewicht (In den Dateien ausversehen den Wert eines Woodcarts hinzugefügt) +Powered Carts - Geschwindigkeit auf Dirt nun bei 100% +``` + +``` +World Object: +Anvil - 20 Mortared Stone & 20 Hewnlogs hinzugefügt zum Rezept (STC Standard) +Bakery Oven - 20 Boards hinzugefügt zum Rezept (STC Standard) +Blast Furnace - Hewn Logs als Brennstoff hinzugefügt +Bloomery - Hewn Logs als Brennstoff hinzugefügt +Bookshelf - 5 Eisenbarren hinzugefügt zum Rezept +Brazier - 5 Mortared Stone hinzugefügt zum Rezept +Butchery Table - 20 Mortared Stone hinzugefügt zum Rezept +Campfire - Hewn Logs als Brennstoff hinzugefügt +Candle Stand - 5 Cloth hinzugefügt zum Rezept +Carpentry Table - 20 Logs im Rezept durch 20 Hewn Logs ersetzt +Cast Iron Stove - 20 Mortared Stone & 20 Boards hinzugefügt zum Rezept (STC Standard) +Ceiling Candle - 5 Cloth hinzugefügt zum Rezept +Cement Kiln - 50 Mortared Stone hinzugefügt zum Rezept (STC Standard) +Combustion Generator - 10 Mortared Stone hinzugefügt zum Rezept (STC Standard) +Couch - 10 Iron Ingot hinzugefügt zum Rezept +Electric Wall Lamp - 4 Copper Wiring & 4 Glass hinzugefügt zum Rezept +Electronics Assembly - 2 Copper Wiring & 6 Boards hinzugefügt zum Rezept +Framed Glass Door - 5 Stahl hinzugefügt zum Rezept +Icebox - 10 Eisenbarren hinzugefügt zum Rezept +Kiln - 10 Stone entfernt dafür 10 Mortared Stone & 20 Boards hinzugefügt zum Rezept (STC Standard) +Kitchen - 10 Mortared Stone hinzugefügt zum Rezept +Laser Gold Ingot auf 150, Steel auf 150 & Circuits auf 150 erhöht. 150 Reinforced Concrete & 150 Lumber hinzugefügt zum Rezept +Fixed alte STC Dateien +Couch & Sessel - Gelten nun als Living Room (um den Small Table zu ersetzen) +Machine Shop - 15 Mortared Stone hinzugefügt zum Rezept +Padded Chair - 5 Iron Ingot hinzugefügt zum Rezept +Planter Pot Round - 2 Dirt hinzugefügt zum Rezept +Planter Pot Square 2 Dirt hinzugefügt zum Rezept +Pumpjack - 30 Steel hinzugefügt zum Rezept +Refrigerator - 5 Plastic hinzugefügt zum Rezept +Research Table - 1 Research Table hinzugefügt zum Rezept +Rolling Mill - Steel auf 20 erhöht, 15 Mortared Stone hinzugefügt zum Rezept +Shelf Cabinet - 5 Iron Ingots hinzugefügt zum rezept +Solar Generator - auf 1000 Watt Produktion erhöht (um es mehr lohnend zu machend) +Steel Ceiling Light - Verbrauch von 250 auf 35 runter gesetzt. 2 Copper Wiring & 5 Glass hinzugefügt zum Rezept +Steel Floor Lamp - Verbrauch von 250 auf 35 runter gesetzt. 2 Copper Wiring & 5 Glass hinzugefügt zum Rezept +Steel Table Lamp - Verbrauch von 250 auf 35 runter gesetzt. 2 Copper Wiring & 5 Glass hinzugefügt zum Rezept +Store - von Basic Crafting Skill 4 auf 1 runtersgesetzt (STC Standard) +Stove - Iron Ingot um 35 erhöht, 35 Steel & 10 Mortared Stone hinzugefügt zum Rezept +Streetlamp - verbrauch von 100 (in v7.3.0 noch 1000^^) auf 35 gesenkt +Tailoring Table - 5 Iron Ingots hinzugefügt zum Rezept +Tallow Candle, Tallow Lamp & Tallow Wall Lamp - 3 Iron Ingots & 2 Cloth hinzugefügt zum Rezept +Torch Stand - 5 Stone hinzugefügt zum Rezept +Wainwright Table - 25 Mortared Stone hinzugefügt zum Rezept (STC Standard) +Wall Candle - 2 Cloth hinzugefügt zum Rezept +Windmill - 5 Mortared Stone & 10 Hewn Logs hinzugefügt zum Rezept (STC Standard) +Wind Turbine - 4 Reinforced Concrete hinzugefügt zum Rezept +Wooden Fabric Bed - 5 Iron Ingots hinzugefügt zum Rezept +``` +``` +Items: +Tailings & Dirt - Max. Aufnehmkapazität auf 20 erhöht +Tailings - Fixed Gewicht wieder auf normalen Wert +``` + +``` +Objects: +Stockpile - Radius der Verlinkung zu anderen Einheiten leicht erhöht +Storage Chest - Radius der Verlinkung zu anderen Einheiten leicht erhöht +``` +``` +Player: +Property Claim Flags - von 10 auf 40 erhöht (STC Standard) +Tools - Anfangstolls (Stein & Holz) wieder hinzugefügt +``` +``` +Skills: +Better Logging Mod (Wood Pulp Cleaner; Stump Cleaner & Expert Lumber) hinzugefügt. Skillpunkte auf Schwierigkeitsgrad angepasst. +Better Mining - Skillpunkte angepasst (Zu hoch für 2 erlernbare Skill) +Better Mining Mod (Mining Pickup Amount;Mining Pickup Range & Strong Mining) hinzugefügt. Skillpunkte auf Schwierigkeitsgrad angepasst. +``` +``` +Cleaning: +Nicht notwendigen Code entfernt +``` + +`Insgesamt 147 Gegenstände & Rezepte verändert. ~43 Neue Gegenstände & Rezepte` \ No newline at end of file diff --git a/Tools/AxeItem.cs b/Tools/AxeItem.cs new file mode 100644 index 0000000..97a9f15 --- /dev/null +++ b/Tools/AxeItem.cs @@ -0,0 +1,59 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. +namespace Eco.Mods.TechTree +{ + using System; + using System.ComponentModel; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Systems.TextLinks; + using Eco.Shared.Localization; + using Kirthos.Mods; + + [Category("Hidden")] + public partial class AxeItem + { + private static SkillModifiedValue caloriesBurn; + private static SkillModifiedValue damage; + static AxeItem() + { + string axeUiLink = new AxeItem().UILink(); + caloriesBurn = CreateCalorieValue(20, typeof(LoggingSkill), typeof(AxeItem), new LocString(axeUiLink)); + damage = CreateDamageValue(1, typeof(LoggingSkill), typeof(AxeItem), new LocString(axeUiLink)); + } + private static IDynamicValue skilledRepairCost = new ConstantValue(1); + public override IDynamicValue SkilledRepairCost { get { return skilledRepairCost; } } + + public override IDynamicValue CaloriesBurn { get { return caloriesBurn; } } + public override SkillModifiedValue Damage { get { return damage; } } + + public override string LeftActionDescription { get { return "Chop"; } } + + public override InteractResult OnActLeft(InteractionContext context) + { + if (context.HasBlock) + { + var block = World.GetBlock(context.BlockPosition.Value); + if (block.Is()) + { + InventoryChangeSet changes = new InventoryChangeSet(context.Player.User.Inventory, context.Player.User); + changes.AddItems(5); + TreeUtils.GetPulpAroundPoint(context.Player.User, context.BlockPosition.Value, 1 + SkillsUtil.GetSkillLevel(context.Player.User, typeof(WoodPulpCleanerSkill))); + return (InteractResult)this.PlayerDeleteBlock(context.BlockPosition.Value, context.Player, false, 3, null, changes); + } + else + return InteractResult.NoOp; + } + else + return base.OnActLeft(context); + } + + public override bool ShouldHighlight(Type block) + { + return Block.Is(block); + } + } +} \ No newline at end of file diff --git a/Tools/HammerItem.cs b/Tools/HammerItem.cs new file mode 100644 index 0000000..0018dc3 --- /dev/null +++ b/Tools/HammerItem.cs @@ -0,0 +1,61 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. + +using System; +using System.ComponentModel; +using Eco.Gameplay.DynamicValues; +using Eco.Gameplay.Interactions; +using Eco.Gameplay.Items; +using Eco.Gameplay.Objects; +using Eco.Shared.Items; +using Eco.Shared.Serialization; +using Eco.World; +using Eco.World.Blocks; + +[Serialized] +[Category("Hidden")] +[CanMakeBlockForm(new[] {"Wall", "Floor", "Roof", "Stairs", "Window", "Fence", "Aqueduct", "Cube", "Column"})] +public class HammerItem : ToolItem +{ + public override string Description { get { return "Destroys constructed materials."; } } + public override string FriendlyName { get { return "Hammer"; } } + + private static IDynamicValue skilledRepairCost = new ConstantValue(1); + public override IDynamicValue SkilledRepairCost { get { return skilledRepairCost; } } + + public override ClientPredictedBlockAction LeftAction { get { return ClientPredictedBlockAction.PickupBlock; } } + public override string LeftActionDescription { get { return "Pick Up"; } } + + public override InteractResult OnActLeft(InteractionContext context) + { + if (context.HasBlock) + { + if (context.Block.Is()) + return (InteractResult)this.PlayerDeleteBlock(context.BlockPosition.Value, context.Player, true, 1); + else if (context.Block is WorldObjectBlock) + { + ((WorldObjectBlock)context.Block).WorldObjectHandle.Object.PickUp(context.Player); + this.BurnCalories(context.Player); + return InteractResult.Success; + } + else + return InteractResult.NoOp; + } + else if (context.Target is WorldObject) + { + (context.Target as WorldObject).PickUp(context.Player); + this.BurnCalories(context.Player); + return InteractResult.Success; + } + else + return InteractResult.NoOp; + } + + static IDynamicValue caloriesBurn = new ConstantValue(1); + public override IDynamicValue CaloriesBurn { get { return caloriesBurn; } } + + public override bool ShouldHighlight(Type block) + { + return Block.Is(block); + } +} \ No newline at end of file diff --git a/Tools/HoeItem.cs b/Tools/HoeItem.cs new file mode 100644 index 0000000..45ddd1f --- /dev/null +++ b/Tools/HoeItem.cs @@ -0,0 +1,58 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. + +using System; +using System.ComponentModel; +using Eco.Core.Utils; +using Eco.Gameplay.DynamicValues; +using Eco.Gameplay.Interactions; +using Eco.Gameplay.Items; +using Eco.Shared.Math; +using Eco.Shared.Serialization; +using Eco.Simulation; +using Eco.World; +using Eco.World.Blocks; + +[Serialized] +[Category("Hidden")] +[Hoer] +public class HoeItem : ToolItem +{ + public override string FriendlyName { get { return "Hoe"; } } + public override string Description { get { return "Used to till soil and prepare it for planting."; } } + + private static IDynamicValue skilledRepairCost = new ConstantValue(1); + public override IDynamicValue SkilledRepairCost { get { return skilledRepairCost; } } + + public override InteractResult OnActLeft(InteractionContext context) + { + if (context.HasBlock) + { + var abovePos = context.BlockPosition.Value + Vector3i.Up; + var aboveBlock = World.GetBlock(abovePos); + if (!aboveBlock.Is() && context.Block.Is()) + { + Result result = this.PlayerPlaceBlock(context.BlockPosition.Value, context.Player, true); + if (result.Success) + { + var plant = EcoSim.PlantSim.GetPlant(abovePos); + if (plant != null) + EcoSim.PlantSim.DestroyPlant(plant, DeathType.Harvesting); + } + + return (InteractResult)result; + } + + return InteractResult.NoOp; + } + + return base.OnActLeft(context); + } + static IDynamicValue caloriesBurn = new ConstantValue(1); + public override IDynamicValue CaloriesBurn { get { return caloriesBurn; } } + + public override bool ShouldHighlight(Type block) + { + return Block.Is(block); + } +} \ No newline at end of file diff --git a/Tools/PickaxeItem.cs b/Tools/PickaxeItem.cs new file mode 100644 index 0000000..2d5bb91 --- /dev/null +++ b/Tools/PickaxeItem.cs @@ -0,0 +1,81 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. +namespace Eco.Mods.TechTree +{ + using System; + using System.ComponentModel; + using Core.Utils; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Players; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Items; + using Eco.World; + using Eco.World.Blocks; + using Gameplay.Objects; + using Kirthos.Mods; + + [Category("Hidden")] + public partial class PickaxeItem : ToolItem + { + private static SkillModifiedValue caloriesBurn = CreateCalorieValue(20, typeof(MiningSkill), typeof(PickaxeItem), new PickaxeItem().UILink()); + static PickaxeItem() { } + + public override IDynamicValue CaloriesBurn { get { return caloriesBurn; } } + + public override ClientPredictedBlockAction LeftAction { get { return ClientPredictedBlockAction.DestroyBlock; } } + public override string LeftActionDescription { get { return "Mine"; } } + + private static IDynamicValue skilledRepairCost = new ConstantValue(1); + public override IDynamicValue SkilledRepairCost { get { return skilledRepairCost; } } + + public override InteractResult OnActLeft(InteractionContext context) + { + if (context.HasBlock && context.Block.Is()) + { + Result result = this.PlayerDeleteBlock(context.BlockPosition.Value, context.Player, false, 1); + if (result.Success) + if (RubbleObject.TrySpawnFromBlock(context.Block.GetType(), context.BlockPosition.Value)) + { + RubbleUtils.BreakBigRubble(context.BlockPosition.Value, 20 * SkillsUtil.GetSkillLevel(context.Player.User, typeof(StrongMiningSkill))); + context.Player.User.UserUI.OnCreateRubble.Invoke(); + } + return (InteractResult)result; + } + else if (context.Target is RubbleObject) + { + var rubble = (RubbleObject)context.Target; + if (rubble.IsBreakable) + { + rubble.Breakup(); + BurnCalories(context.Player); + return InteractResult.Success; + } + else + return InteractResult.NoOp; + } + else + return InteractResult.NoOp; + } + + public override bool ShouldHighlight(Type block) + { + return Block.Is(block); + } + + public override InteractResult OnActRight(InteractionContext context) + { + User user = context.Player.User; + if (context.HasBlock == false || user.Inventory.Carried.IsEmpty) + { + if (SkillsUtil.HasSkillLevel(user, typeof(MiningPickupAmountSkill), 1)) + { + RubbleUtils.PickUpRubble(user, 2 + (2 * SkillsUtil.GetSkillLevel(user, typeof(MiningPickupRangeSkill))), (4 * SkillsUtil.GetSkillLevel(user, typeof(MiningPickupAmountSkill)))); + return InteractResult.Success; + } + } + return InteractResult.NoOp; + } + } +} \ No newline at end of file diff --git a/Tools/ScytheItem.cs b/Tools/ScytheItem.cs new file mode 100644 index 0000000..e049123 --- /dev/null +++ b/Tools/ScytheItem.cs @@ -0,0 +1,67 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. +namespace Eco.Mods.TechTree +{ + using System; + using System.ComponentModel; + using Core.Utils; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Plants; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Items; + using Eco.Shared.Utils; + using Eco.Simulation; + using Eco.World; + + [Category("Hidden")] + [Mower] + public partial class ScytheItem : ToolItem + { + private static SkillModifiedValue caloriesBurn = CreateCalorieValue(20, typeof(FarmingSkill), typeof(ScytheItem), new ScytheItem().UILink()); + static ScytheItem() { } + + public override IDynamicValue CaloriesBurn { get { return caloriesBurn; } } + + public override ClientPredictedBlockAction LeftAction { get { return ClientPredictedBlockAction.Harvest; } } + public override string LeftActionDescription { get { return "Reap"; } } + + private static IDynamicValue skilledRepairCost = new ConstantValue(1); + public override IDynamicValue SkilledRepairCost { get { return skilledRepairCost; } } + + public override InteractResult OnActLeft(InteractionContext context) + { + if (!context.HasBlock || !context.Block.Is()) + return InteractResult.NoOp; + + var plant = EcoSim.PlantSim.GetPlant(context.BlockPosition.Value); + if (plant != null && plant is IHarvestable) + { + if (plant.Dead) + { + EcoSim.PlantSim.DestroyPlant(plant, DeathType.Harvesting); + return InteractResult.Success; + } + else + { + Result result = (plant as IHarvestable).TryHarvest(context.Player, true); + if (result.Success) + { + this.BurnCalories(context.Player); + context.Player.SpawnBlockEffect(context.BlockPosition.Value, context.Block.GetType(), BlockEffect.Harvest); + } + + return (InteractResult)result; + } + } + else + return (InteractResult)this.PlayerDeleteBlock(context.BlockPosition.Value, context.Player, false); + } + + public override bool ShouldHighlight(Type block) + { + return Block.Is(block); + } + } +} \ No newline at end of file diff --git a/Tools/ShovelItem.cs b/Tools/ShovelItem.cs new file mode 100644 index 0000000..0a09d39 --- /dev/null +++ b/Tools/ShovelItem.cs @@ -0,0 +1,83 @@ +// Copyright (c) Strange Loop Games. All rights reserved. +// See LICENSE file in the project root for full license information. +namespace Eco.Mods.TechTree +{ + using System; + using System.ComponentModel; + using Core.Utils; + using Eco.Gameplay.DynamicValues; + using Eco.Gameplay.Interactions; + using Eco.Gameplay.Items; + using Eco.Gameplay.Plants; + using Eco.Gameplay.Systems.TextLinks; + using Eco.Shared.Items; + using Eco.Shared.Math; + using Eco.Simulation; + using Eco.World; + using Eco.World.Blocks; + + [Category("Hidden")] + public partial class ShovelItem : ToolItem + { + private static SkillModifiedValue caloriesBurn = CreateCalorieValue(20, typeof(ShovelEfficiencySkill), typeof(ShovelItem), new ShovelItem().UILink()); + public override IDynamicValue CaloriesBurn { get { return caloriesBurn; } } + + public override ClientPredictedBlockAction LeftAction { get { return ClientPredictedBlockAction.PickupBlock; } } + public override string LeftActionDescription { get { return "Dig"; } } + + private static IDynamicValue skilledRepairCost = new ConstantValue(1); + public override IDynamicValue SkilledRepairCost { get { return skilledRepairCost; } } + + public override InteractResult OnActLeft(InteractionContext context) + { + if (context.HasBlock) + { + if (context.Block is PlantBlock) + { + var plant = EcoSim.PlantSim.GetPlant(context.BlockPosition.Value); + if (plant != null && plant is IHarvestable) + { + IHarvestable harvestable = (IHarvestable)plant; + + if (plant.Dead) + { + EcoSim.PlantSim.DestroyPlant(plant, DeathType.Harvesting); + return InteractResult.Success; + } + else + { + Result result = harvestable.TryHarvest(context.Player, false); + if (result.Success) + this.BurnCalories(context.Player); + return (InteractResult)result; + } + } + else + return (InteractResult)this.PlayerDeleteBlock(context.BlockPosition.Value, context.Player, false); + } + else if (context.Block.Is()) + { + if (TreeEntity.TreeRootsBlockDigging(context)) + return InteractResult.FailureLocStr("You attempt to dig up the soil, but the roots are too strong!"); + + Result result = this.PlayerDeleteBlock(context.BlockPosition.Value, context.Player, true, 1, new DirtItem()); + if (result.Success) + { + var plant = EcoSim.PlantSim.GetPlant(context.BlockPosition.Value + Vector3i.Up); + if (plant != null) + EcoSim.PlantSim.DestroyPlant(plant, DeathType.Harvesting); + } + + return (InteractResult)result; + } + else + return InteractResult.NoOp; + } + else + return InteractResult.NoOp; + } + + public override int MaxTake { get { return 1; } } + public override bool ShouldHighlight(Type block) { return Block.Is(block);} + } +} \ No newline at end of file