Skip to content

Reference

tilttek/crafting

Every public type of the package, with its role.

TypeRole
CrafterPreviews, crafts once per key, lists what is craftable and closest
RecipeBookThe recipes by their codes, read from plain values and written back
RecipeIngredients, outputs, items given back, kind and attributes
RecipeKindCombine or Evolve
IngredientAn item or a tag, a quantity, consumed or a tool
ItemQuantityA number of one item
HoldingWhat a holder has of one item, with its tags
PlanWhat a craft would take, use, give back and produce, and what is missing
RequirementOne ingredient of a plan: needed, set aside, missing
SelectionThe items a member chooses for the ingredients asked by a tag
CraftA craft made: key, holder, recipe, repetitions, items, moment, item that evolved
CraftedTold once a craft was applied, identifiers only
Contract\InventoryThe holders' items and the crafts applied to them
Contract\ConsumptionPolicyThe items no craft consumes
Contract\CraftObserverWhat the application does once a craft was applied
Policy\ProtectedItemsA fixed list of items no craft consumes
Store\InMemoryInventoryThe inventory in memory
Exception\CraftingExceptionEvery exception of the library
Exception\InvalidRecipeA value out of bounds
Exception\RecipeNotFoundA recipe the book does not hold
Exception\CraftRefusedA craft that cannot be made