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

book_learn optional third entry does nothing? #36790

Closed
Jerimee opened this issue Jan 7, 2020 · 10 comments · Fixed by #42475
Closed

book_learn optional third entry does nothing? #36790

Jerimee opened this issue Jan 7, 2020 · 10 comments · Fixed by #42475
Labels
<Bug> This needs to be fixed Crafting / Construction / Recipes Includes: Uncrafting / Disassembling <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON <Question> Answer me please.

Comments

@Jerimee
Copy link
Contributor

Jerimee commented Jan 7, 2020

Describe the bug

Locally, I added a cookbook cookbook_liverforkids. I then added the following line to the foie_gras result of offal_dishes.json:

"book_learn": [ [ "mag_cooking", 4 ], [ "mag_glam", 5 ], [ "cookbook_liverforkids", 5, "Buttery Duck Bites" ] ]

The recipe can be learned from the book in game, but the display shows no mention of "Buttery Duck Bites"

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add a third entry to book_learn identifier.
  2. Wish yourself the book using the debug.
  3. Read/view the book. There is no mention of the string added in step one.

Expected behavior

From the doc in JSON_INFO it reads: "The optional third entry defines a name for the recipe as it should appear in the books description"

I took this to mean that the book description would display the recipe as specified in the third entry string. It displays it as the result instead.
cdda-liver

Screenshots

Versions and configuration

n/a

Additional context

at JSON_INFO.md#recipes it reads:

"book_learn": [              // (optional) Array of books that this recipe can be learned from. Each entry contains the id of the book and the skill level at which it can be learned.
    [ "textbook_anarch", 7, "something" ], // The optional third entry defines a name for the recipe as it should appear in the books description (default is the name of resulting item of the recipe)
    [ "textbook_gaswarfare", 8, "" ] // If the name is empty, the recipe is hidden, it will not be shown in the description of the book.
],
"difficulty": 3,             // Difficulty of success check
[ "textbook_anarch", 7, "something" ], // The optional third entry defines a name for the recipe as it should appear in the books description (default is the name of resulting item of the recipe)

But the optional third entry doesn't appear to do anything...

In recipe.cpp the only of mention of book_learn is:

    if( jo.has_member( "book_learn" ) ) {
        booksets.clear();
        for( JsonArray arr : jo.get_array( "book_learn" ) ) {
            booksets.emplace( arr.get_string( 0 ), arr.size() > 1 ? arr.get_int( 1 ) : -1 );
        }
    }

And in fact it appears that that is the only mention in all of src.

So is the third optional entry deprecated? WIP?

@Night-Pryanik Night-Pryanik added <Documentation> Design documents, internal info, guides and help. <Question> Answer me please. [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling labels Jan 8, 2020
@Night-Pryanik
Copy link
Contributor

Yeah, seems like either it was never implemented or was removed for some reason.

@Jerimee
Copy link
Contributor Author

Jerimee commented Jan 8, 2020

I thought it was a nice feature, but clearly not a necessity. Should I close this issue and add it to a feature request? Or is there some way to just convert this into a feature req?

@Night-Pryanik
Copy link
Contributor

It's fine as it is.

@BevapDin
Copy link
Contributor

This feature was removed by b70a6a4, no idea why.

@Jerimee
Copy link
Contributor Author

Jerimee commented Jan 17, 2020

This issue is still open right?

If there is a decent hope of this feature being restored I'll continue to populate the field.

@stale
Copy link

stale bot commented Feb 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Feb 16, 2020
@kevingranade
Copy link
Member

There is, it's a nice feature and it shouldn't be hard to re-add.

@stale stale bot removed the stale Closed for lack of activity, but still valid. label Feb 17, 2020
@stale
Copy link

stale bot commented Mar 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Mar 18, 2020
@stale
Copy link

stale bot commented Apr 17, 2020

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this as completed Apr 17, 2020
@esotericist esotericist added <Bug> This needs to be fixed and removed stale Closed for lack of activity, but still valid. labels Jul 26, 2020
@esotericist esotericist reopened this Jul 26, 2020
@esotericist
Copy link
Contributor

Reopening, as a discrepancy between documentation and game code to the extent of "feature described does not actually exist" is absolutely a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Crafting / Construction / Recipes Includes: Uncrafting / Disassembling <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON <Question> Answer me please.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants