tModLoader v0.11.8.9
A mod to make and play Terraria mods
|
This class will search through all existing recipes for you based on criteria that you give it. It's useful for finding a particular vanilla recipe that you wish to remove or edit. Use this by creating new instances with the empty constructor for each search you perform. More...
Public Member Functions | |
RecipeFinder () | |
void | AddIngredient (int itemID, int stack=1) |
Adds an ingredient with the given item type and stack size to the search criteria. More... | |
void | AddRecipeGroup (int recipeGroupID, int stack=1) |
Adds a recipe group ingredient with the given RecipeGroupID and stack size to the search criteria. More... | |
void | AddRecipeGroup (string name, int stack=1) |
Adds a recipe group ingredient with the given RecipeGroup name and stack size to the search criteria. More... | |
void | AddTile (int tileID) |
Adds a required crafting station with the given tile type to the search criteria. More... | |
Recipe | FindExactRecipe () |
Searches for a recipe that matches the search criteria exactly, then returns it. That means the recipe will have exactly the same ingredients, tiles, liquid requirements, recipe groups, and result; even the stack sizes will match. If no recipe with an exact match is found, this will return null. More... | |
List< Recipe > | SearchRecipes () |
Searches for all recipes that include the search criteria, then returns them in a list. In terms of ingredients, it will search for recipes that include all the search criteria ingredients, with stack sizes greater than or equal to the search criteria. It will also make sure the recipes include all search criteria recipe groups and tiles. If the search criteria includes a result, the recipes will also have the same result with a stack size greater than or equal to the search criteria. Finally, if needWater, needLava, or needHoney are set to true, the found recipes will also have them set to true. More... | |
void | SetResult (int itemID, int stack=1) |
Sets the search criteria's result to the given item type and stack size. More... | |
Public Attributes | |
bool | needHoney |
Adds the requirement of being nearby honey to the search criteria. Defaults to false. More... | |
bool | needLava |
Adds the requirement of being nearby lava to the search criteria. Defaults to false. More... | |
bool | needWater |
Adds the requirement of being nearby water to the search criteria. Defaults to false. More... | |
Static Private Member Functions | |
static List< int > | GetAcceptedGroups (Recipe recipe) |
Private Attributes | |
List< int > | groups = new List<int>() |
List< Item > | items = new List<Item>() |
Item | result = new Item() |
List< int > | tiles = new List<int>() |
This class will search through all existing recipes for you based on criteria that you give it. It's useful for finding a particular vanilla recipe that you wish to remove or edit. Use this by creating new instances with the empty constructor for each search you perform.
Definition at line 10 of file RecipeFinder.cs.
Terraria.ModLoader.RecipeFinder.RecipeFinder | ( | ) |
Definition at line 29 of file RecipeFinder.cs.
void Terraria.ModLoader.RecipeFinder.AddIngredient | ( | int | itemID, |
int | stack = 1 |
||
) |
Adds an ingredient with the given item type and stack size to the search criteria.
itemID | The item ID of the ingredient to add. |
stack | The stack of the ingredient to add. |
Definition at line 37 of file RecipeFinder.cs.
References Terraria.ModLoader.Item, Terraria.ModLoader.ItemLoader.ItemCount, and Terraria.ModLoader.RecipeFinder.items.
Referenced by Terraria.ModLoader.RecipeFinder.AddRecipeGroup().
void Terraria.ModLoader.RecipeFinder.AddRecipeGroup | ( | int | recipeGroupID, |
int | stack = 1 |
||
) |
Adds a recipe group ingredient with the given RecipeGroupID and stack size to the search criteria.
name | The RecipeGroupID of the recipegroup to accept. |
stack | The stack of the recipegroup to accept. |
Definition at line 67 of file RecipeFinder.cs.
References Terraria.ModLoader.RecipeFinder.AddIngredient(), and Terraria.ModLoader.RecipeFinder.groups.
void Terraria.ModLoader.RecipeFinder.AddRecipeGroup | ( | string | name, |
int | stack = 1 |
||
) |
Adds a recipe group ingredient with the given RecipeGroup name and stack size to the search criteria.
name | The name of the recipegroup to accept. |
stack | The stack of the recipegroup to accept. |
Definition at line 52 of file RecipeFinder.cs.
References Terraria.ModLoader.RecipeFinder.AddIngredient(), and Terraria.ModLoader.RecipeFinder.groups.
void Terraria.ModLoader.RecipeFinder.AddTile | ( | int | tileID | ) |
Adds a required crafting station with the given tile type to the search criteria.
tileID | The tile ID of the tile to add. |
Definition at line 94 of file RecipeFinder.cs.
References Terraria.ModLoader.TileLoader.TileCount, and Terraria.ModLoader.RecipeFinder.tiles.
Recipe Terraria.ModLoader.RecipeFinder.FindExactRecipe | ( | ) |
Searches for a recipe that matches the search criteria exactly, then returns it. That means the recipe will have exactly the same ingredients, tiles, liquid requirements, recipe groups, and result; even the stack sizes will match. If no recipe with an exact match is found, this will return null.
Definition at line 105 of file RecipeFinder.cs.
References Terraria.ModLoader.RecipeFinder.GetAcceptedGroups(), Terraria.ModLoader.RecipeFinder.groups, Terraria.ModLoader.Item, Terraria.ModLoader.RecipeFinder.items, Terraria.ModLoader.RecipeFinder.needHoney, Terraria.ModLoader.RecipeFinder.needLava, Terraria.ModLoader.RecipeFinder.needWater, Terraria.ModLoader.RecipeFinder.result, and Terraria.ModLoader.RecipeFinder.tiles.
|
staticprivate |
Definition at line 271 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.FindExactRecipe(), and Terraria.ModLoader.RecipeFinder.SearchRecipes().
List< Recipe > Terraria.ModLoader.RecipeFinder.SearchRecipes | ( | ) |
Searches for all recipes that include the search criteria, then returns them in a list. In terms of ingredients, it will search for recipes that include all the search criteria ingredients, with stack sizes greater than or equal to the search criteria. It will also make sure the recipes include all search criteria recipe groups and tiles. If the search criteria includes a result, the recipes will also have the same result with a stack size greater than or equal to the search criteria. Finally, if needWater, needLava, or needHoney are set to true, the found recipes will also have them set to true.
Definition at line 196 of file RecipeFinder.cs.
References Terraria.ModLoader.RecipeFinder.GetAcceptedGroups(), Terraria.ModLoader.RecipeFinder.groups, Terraria.ModLoader.Item, Terraria.ModLoader.RecipeFinder.items, Terraria.ModLoader.RecipeFinder.needHoney, Terraria.ModLoader.RecipeFinder.needLava, Terraria.ModLoader.RecipeFinder.needWater, Terraria.ModLoader.RecipeFinder.result, and Terraria.ModLoader.RecipeFinder.tiles.
void Terraria.ModLoader.RecipeFinder.SetResult | ( | int | itemID, |
int | stack = 1 |
||
) |
Sets the search criteria's result to the given item type and stack size.
itemID | The item ID of the item to set as result. |
stack | The stack of the item to set as result. |
Definition at line 82 of file RecipeFinder.cs.
References Terraria.ModLoader.ItemLoader.ItemCount, and Terraria.ModLoader.RecipeFinder.result.
|
private |
Definition at line 13 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.AddRecipeGroup(), Terraria.ModLoader.RecipeFinder.FindExactRecipe(), and Terraria.ModLoader.RecipeFinder.SearchRecipes().
|
private |
Definition at line 12 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.AddIngredient(), Terraria.ModLoader.RecipeFinder.FindExactRecipe(), and Terraria.ModLoader.RecipeFinder.SearchRecipes().
bool Terraria.ModLoader.RecipeFinder.needHoney |
Adds the requirement of being nearby honey to the search criteria. Defaults to false.
Definition at line 27 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.FindExactRecipe(), and Terraria.ModLoader.RecipeFinder.SearchRecipes().
bool Terraria.ModLoader.RecipeFinder.needLava |
Adds the requirement of being nearby lava to the search criteria. Defaults to false.
Definition at line 23 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.FindExactRecipe(), and Terraria.ModLoader.RecipeFinder.SearchRecipes().
bool Terraria.ModLoader.RecipeFinder.needWater |
Adds the requirement of being nearby water to the search criteria. Defaults to false.
Definition at line 19 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.FindExactRecipe(), and Terraria.ModLoader.RecipeFinder.SearchRecipes().
|
private |
Definition at line 14 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.FindExactRecipe(), Terraria.ModLoader.RecipeFinder.SearchRecipes(), and Terraria.ModLoader.RecipeFinder.SetResult().
|
private |
Definition at line 15 of file RecipeFinder.cs.
Referenced by Terraria.ModLoader.RecipeFinder.AddTile(), Terraria.ModLoader.RecipeFinder.FindExactRecipe(), and Terraria.ModLoader.RecipeFinder.SearchRecipes().