![]() |
Mod Helpers
v5.9.6
A centralized collection of library code, helpful services, and end-user functions for mod management and information.
|
Assorted static "helper" functions pertaining to recipes. More...
Static Public Member Functions | |
static RecipeCraftFailReason | GetRecipeFailReasons (Player player, Recipe recipe, out int[] missingTile, out IDictionary< int, int > missingItemTypesStacks, IEnumerable< Item > availableIngredients=null) |
Reports all the reasons a given recipe for a givne player will fail with a given set of ingredients (defaults to the player's inventory). More... | |
static IList< int > | GetAvailableRecipesOfIngredients (Player player, IEnumerable< Item > ingredients) |
Gets available recipes of a given set of ingredient items for a given player. More... | |
static bool | ItemHasIngredients (int itemType, IDictionary< int, int > ingredients) |
Indicates if a given item type has the ingredients it needs to be crafted from any of its recipes. Does not check tile requirements. More... | |
Assorted static "helper" functions pertaining to recipes.
Definition at line 34 of file RecipeHelpers.cs.
|
static |
Gets available recipes of a given set of ingredient items for a given player.
player | |
ingredients |
Definition at line 147 of file RecipeHelpers.cs.
|
static |
Reports all the reasons a given recipe for a givne player will fail with a given set of ingredients (defaults to the player's inventory).
player | |
recipe | |
missingTile | Returns the tile IDs (crafting stations) needed for the recipe. |
missingItemTypesStacks | Returns the missing item ids and amounts for the recipe. |
availableIngredients |
Definition at line 45 of file RecipeHelpers.cs.
|
static |
Indicates if a given item type has the ingredients it needs to be crafted from any of its recipes. Does not check tile requirements.
itemType | Item type to find recipes for. |
ingredients | Ingredient item types and their stack sizes. |
Definition at line 183 of file RecipeHelpers.cs.