Class Recipe
Inheritance
System.Object
Recipe
Assembly: Eco.Gameplay.dll
Syntax
public class Recipe : Object, IController, IViewController, IHasUniversalID, ILinkable
Constructors
Recipe()
Declaration
Recipe(String, LocString, IngredientElement[], CraftingElement[])
Declaration
public Recipe(string name, LocString displayName, IngredientElement[] ingredients, params CraftingElement[] outputs)
Parameters
Properties
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
DisplayName
Declaration
public LocString DisplayName { get; set; }
Property Value
Family
Declaration
public RecipeFamily Family { get; }
Property Value
Ingredients
Declaration
public List<IngredientElement> Ingredients { get; protected set; }
Property Value
Name
Declaration
public string Name { get; protected set; }
Property Value
Type |
Description |
System.String |
|
Products
Declaration
[NewTooltipChildren]
public List<CraftingElement> Products { get; protected set; }
Property Value
RequiresStrangeBlueprint
When true, this recipe will require the user to possess the strange blueprint with the corresponding name.
Declaration
public bool RequiresStrangeBlueprint { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
UsesPlayerInventory
When false,this recipe will not use player inventory on craft. Can be useful for dangerous recipes like tool scrap, etc.
Declaration
public bool UsesPlayerInventory { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
ActivateVariant(RecipeVariant)
Declaration
public void ActivateVariant(RecipeVariant variant)
Parameters
HasIngredients(User, Inventory)
Checks if the inventory has any of the required ingredients.
Declaration
public bool HasIngredients(User user, Inventory inv)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Init(String, LocString, List<IngredientElement>, List<CraftingElement>)
Declaration
public void Init(string name, LocString displayName, List<IngredientElement> ingredients, List<CraftingElement> items)
Parameters
MainProductQuantity()
Declaration
public int MainProductQuantity()
Returns
Type |
Description |
System.Int32 |
|
OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
Declaration
public void OnLinkClicked(TooltipOrigin origin, TooltipClickContext clickContext, User user)
Parameters
UILinkContent()
Declaration
public LocString UILinkContent()
Returns
Implements
Extension Methods