Add new mission/talk effect u_learn_recipe #33574
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Features "Add new mission/talk effect u_learn_recipe"
Purpose of change
This adds a new effect for usage in dialogues and missions,
u_learn_recipe
which will teach the player the specified recipe. It also has a counterpart condition to check whether a recipe is memorized,u_know_recipe
.Describe the solution
I followed the existing patterns for effects and condition here. The only special things to note are that a recipe is only considered known by the condition if it's memorized--having a book with the recipe on hand is insufficient, and the recipe may be learned even if the player has insufficient skill to execute it.
I also added a demonstration mission that uses this feature, where the player is asked to fetch cattail stalks and is then taught how to make cattail jelly. It's not really the focus of these changes--I just wanted to have something exercising the functionality and I feel like we can always use more missions.