Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hobbies can give recipes #79555

Conversation

Maleclypse
Copy link
Member

Summary

None

Purpose of change

Hobbies could give proficiencies but not recipes. This seems like an oversight.

Describe the solution

Copy the hobby proficiency code. Adjust. Test. Adjust.

Describe alternatives you've considered

All the people I would beg have given their lives over to minecraft for immediate future. Must attempt on ownself first.

Testing

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Feb 6, 2025
Copy link
Contributor

@QuillInkwell QuillInkwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code wasn't quite working.

I've compiled and tested it with these changes and confirmed the Gracken hobby awarded the recipes.

If you're curious the problem was:
Once you get all the recipe ids you don't want to assign to the profession IDs type they ought to be recipe ids.
If I am reading the code correctly, the has_learned check is redundant here. learn_recipe is already guarded against duplicated entries.
There doesn't seem to be a function called add_recipe. Instead learn_recipe is what you need to use. Which does require fetching the actual recipe object using the id.
But I am pretty new to the code base and C++ in general so take what I say with a grain of salt.

src/newcharacter.cpp Outdated Show resolved Hide resolved
Co-authored-by: Marc <altairre.atsu@gmail.com>
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Feb 6, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Feb 6, 2025
@ashGlaw
Copy link
Contributor

ashGlaw commented Feb 6, 2025

This is a great improvement, well deserved. Way to go!

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 7, 2025
@GuardianDll GuardianDll merged commit c346c0b into CleverRaven:master Feb 7, 2025
27 checks passed
@GuardianDll GuardianDll deleted the Gracken-Recipes-for-gracken-hobby-species branch February 7, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world json-styled JSON lint passed, label assigned by github actions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants