Module:RecipeTreeSearch/doc
Jump to navigation
Jump to search
This is the documentation page for Module:RecipeTreeSearch
Module:RecipeTreeSearch requires Module:Break Isolation.
Module:RecipeTreeSearch is required by Module:Infobox Recipe.
Module:RecipeTreeSearch is required by Module:LeatherworkerList.
Module:RecipeTreeSearch is required by Module:ProfessionList.
This module is a helper module to be used by other modules; it may not designed to be invoked directly. See Brighter Shores:Lua/Helper modules for a full list and more information.
Function | Type | Use |
---|---|---|
main(item) | item : string, name of an item page | Returns a Lua Table structured as a Recipe, but containing additional information about a multi-stage crafting process such including: All base materials, including their buy price in shops All intermediate materials, including both the number of materials and the number of times the crafting step needs to be performed Total values for XP, KP, duration |
treeSearch(inputs) | inputs : table of name/quantity pairs, for the inputs to a recipe | Use this function on the inputs to a recipe rather than the name of the output of a recipe. This allows the tree to be searched before the final recipe has been made.
IMPORTANT: within the Infobox Recipe that constructs a recipe, it is imporant to use this function instead of main(), so that this module will not attempt to use the recipe before it has been constructed. Returns a the same structure Lua Table as main(), however it lacks any information on the final step. |
getRecipe(item) | item : string, name of an item page | Returns the Lua Table of the Recipe for the single step. Will also find an activitiy which produce the item on the specified page. |
getShopBuyPrice(item) | item : string, name of an item page | Returns the value that the item can be bought at, or nil if it cannot be bought |
getShopSellPrice(item) | item : string, name of an item page | Returns the value that the item can be sold for, or nil if it cannot be sold |