dao::crafting

Declared in dao/Crafting.h.

Classes

Class  
Ingredient An ingredient of a recipe, and how many of it the party’s backpack holds.
Recipe A recipe the party knows, as the screen shows it to a crafter.

Enumerations

Craft

enum class Craft : std::uint8_t

The crafts, as the screen groups their recipes.

Value  
Traps  
Herbalism  
Poisons  
Runes  

Refusal

enum class Refusal : std::uint8_t

Why a recipe was not made, or None if it was.

Value  
None  
Unknown the party does not know the recipe, or there is no such recipe
NoRank the crafter has not the skill it needs
NoIngredients the backpack lacks an ingredient
NotMade the engine made nothing of it

Functions

Make()

Refusal Make(std::int32_t recipe, ObjectId crafter)

Makes one of a recipe as the screen’s Create does: its ingredients leave the party’s backpack and the item goes in it, and the module counts a thing crafted.

Refused where the screen greys it out.

Recipes()

std::vector<Recipe> Recipes(Craft craft, ObjectId crafter)

Returns the recipes of a craft the party knows, in the table’s order, as the screen shows them to a crafter.

Call it, and Make, on the game thread, in a module.