public sealed class CrafterOne character's crafting: what they know, and what they can make right now.
Remarks
Doc 28: "nothing here is technically hard; the value is in it being the same system as gathering and using the same requirement algebra". A station is a tag query, so a forge and an enchanted forge both satisfy one recipe; a skill is a number a ProgressionState already answers; a gate is a RequirementSet.
⚠ It consumes nothing and produces nothing. Craft reports what must move, exactly as QuestJournal.TurnIn and the economy's intents do.
Fields and properties (3)
public CraftingLibrary LibraryWhere the recipes come from.
public IRequirementContext? SkillsWhat answers their skill and their requirements.
public int LearnedHow many recipes they have learned beyond the ones everybody knows.
Events (1)
public Action<Recipe>? DiscoveredRaised when a recipe is learned, however it was.
Methods (7)
public Crafter(CraftingLibrary library, IRequirementContext? skills = null)Makes one.
public bool Knows(Recipe recipe)Whether they know a recipe.
public bool Learn(Recipe recipe)Teaches them one.
public int SkillIn(Recipe recipe)How good they are at a recipe's profession.
public CraftingRefusal CanCraft(Recipe recipe, GameplayTagSet? stations, IReadOnlyDictionary<uint, int> holdings)Whether they can make something, and why not.
public CraftingRefusal Craft(Recipe recipe, GameplayTagSet? stations, IReadOnlyDictionary<uint, int> holdings, ulong attempt, out CraftingResult result)Makes something, and says what to move.
public bool TryDiscover(IReadOnlyList<RecipeItem> ingredients, out Recipe? recipe)Tries to find a recipe by putting things in the pot.
Used by (1)
- CraftingTestsVixen.Gameplay.Crafting.Tests