55 lines
2.5 KiB
C#
55 lines
2.5 KiB
C#
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<ModTestItem>(), //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<MilkItem>(typeof(MolecularGastronomyEfficiencySkill), 20, MolecularGastronomyEfficiencySkill.MultiplicativeStrategy),
|
|
};
|
|
//default crafting speed 5
|
|
var craftingspeed = 5.0f;
|
|
this.CraftMinutes = CreateCraftTimeValue(typeof(ModTestRecipe), Item.Get<ModTestItem>().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
|
|
}
|
|
}
|
|
} |