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

Compute materials the player have in stack/chests to determine craftable/cook-able recipes #2

Open
mlorant opened this issue May 9, 2018 · 1 comment

Comments

@mlorant
Copy link

mlorant commented May 9, 2018

I got an idea that may simplify the life for those who are achievement seeker (like me) and want to craft/cook known recipes as fast as possible.

Today there are two categories for crafting and cooking: Known recipes and Unknown recipes. I would like to introduce a new one: Ready to [cook|craft] recipes.

This category would list recipes known by the player and that can be done with the current items in the inventory/fridge and chests. This would avoid many round trip between the checkup and the wiki/menus.
I would not include unknown recipes as you should not know what they need (except using the wiki...) and as anyway you need the recipe first.

To achieve that however, it implies to import/copy the recipes content in the JS file... I don't think it is a big deal, but that would be a lot of data to append. A recipe could be represented like this:

recipes: {
    [...]
    611:  {
        'name': 'Blackberry Cobbler',
        'requirements': [ [2, 410], [1, 245], [1, 246] ]
    }
    [...]
}

... where [ [2, 410], [1, 245], [1, 246] ] means 2 Blackberries, 1 sugar and 1 wheat flour (according to my savefile, is it parentSheetIndex that I should take?). Once this big data object is specified, we need to iterate over each <Object xsi:type="Chest" />, <fridge /> and <items /> to create a list of all the "materials" available to cook/craft the recipes.

This may severely slow down the JS processing of the file however, so it may be done apart/async of the rest, or give an extra button to compute it if the player needs it.

What do you think about it, @MouseyPounds?

@MouseyPounds
Copy link
Owner

I think this is beyond the scope of the app due to both the amount of data needed for the recipe ingredients and the amount of container searching. I'm leaving it open for now, though, as it is an interesting idea and I do see the usefulness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants