Table of Contents

Class RecipeData

Namespace
Nautilus.Crafting
Assembly
Nautilus.dll
A class that fully describes a recipe for a TechType identified item.
public class RecipeData : ITechData
Inheritance
RecipeData
Implements
ITechData
Inherited Members
Extension Methods

Constructors

RecipeData()

Initializes a new instance of the RecipeData class a custom recipe.
public RecipeData()

RecipeData(params Ingredient[])

Initializes a new instance of the RecipeData class for a custom recipe with a collection of ingridients.
public RecipeData(params CraftData.Ingredient[] ingredients)

Parameters

ingredients Ingredient[]
The ingredients.

RecipeData(List<Ingredient>)

Initializes a new instance of the RecipeData class for a custom recipe with a list of ingridients.
public RecipeData(List<CraftData.Ingredient> ingredients)

Parameters

ingredients List<CraftData.Ingredient>
The ingredients.

Fields

Ingredients

The list of ingredients required for this recipe.
[JsonProperty]
public List<CraftData.Ingredient> Ingredients

Field Value

List<CraftData.Ingredient>

LinkedItems

The items that will also be created when this recipe is crafted.
[JsonProperty]
public List<TechType> LinkedItems

Field Value

List<TechType>

Properties

craftAmount

Gets or sets the how many copies of the item are created when crafting this recipe.
[JsonProperty]
public int craftAmount { get; set; }

Property Value

int
The quantity of the item this recipe yields.

ingredientCount

Gets the number of different ingredients for this recipe.
[JsonIgnore]
public int ingredientCount { get; }

Property Value

int
The number of ingredients for this recipe.

linkedItemCount

Gets the number of items linked to this recipe.
[JsonIgnore]
public int linkedItemCount { get; }

Property Value

int
The number of linked items.

Methods

GetIngredient(int)

Gets the ingredient at the specified index.
public CraftData.Ingredient GetIngredient(int index)

Parameters

index int
The index.

Returns

CraftData.Ingredient
The CraftData.Ingredient at the requested the index if the index is value; Otherwise returns null.

GetLinkedItem(int)

Gets the linked item at the specified index.
public TechType GetLinkedItem(int index)

Parameters

index int
The index.

Returns

TechType
The TechType at the requested the index if the index is value; Otherwise returns null.