Feature - Implemented Recipe/Ingredients commands

Theraze

Active member
Aankhen made a patch using a newer version of Java than we support. If it could be translated to work with mafia properly, that would be nice. Including a link to his post where he initially posted the patch (though he updated it below that) which includes a screenshot.

I added a couple of commands (‘recipe’ and ‘ingredients’) that make use of the same ingredients-munging framework:
ingredients.png


Hope this comes in useful.

Veracity translated the main part of the patch, the slimeling tracking, into mafia-Java, but these commands remain uncommitted.
 

roippi

Developer
This would be nice. Quickly looking over the patch, I see a good number of things that were added in 1.5 (@Override annotations, Classes such as StringBuilder, and Generics with wildcards).
 

Theraze

Active member
Hmm... three questions (which might be answered by 9589, which isn't pulling for me just yet):
1) It really wants to break things down as much as possible, despite having completed ingredients. For example, the ducha de oro drink takes a bottle of tequila which you can make with cactus fruit and fermenting powder... I don't have any cactus currently, but I do have 4 bottles of tequila. As it's parsing the ingredients, if you have the completed items, could/should it list that? The should part is because maybe you really do want to make another item... ingredients and recipe don't work with a quantity, which would make that level of ingredient planning both more complicated, and more useful (maybe).
2) Should it say when a special recipe is required? The "recipe russian ice" just says that it's a fancy drink, not that it actually has a recipe needed to make it.
3) Any way to get this into ash? Most of it is available through get_ingredients, but I don't think there's any standardized way to easily check for recipes, special combining methods, skills, etc. Some way of knowing what the special needs to finish a combination would be awesome.

Sorry, one more. Should the fuzzy item matcher work on this in the 'normal' way?
> recipe ducha oro

Skipping unknown or ambiguous item: ducha oro
 
Last edited:

Veracity

Developer
Staff member
Hmm... three questions (which might be answered by 9589, which isn't pulling for me just yet):
What you get is what you get: Aankhen's commands, warts and all. I have no more time to work on this, at the moment.

I suppose I should open this up again...

1) It really wants to break things down as much as possible, despite having completed ingredients. For example, the ducha de oro drink takes a bottle of tequila which you can make with cactus fruit and fermenting powder... I don't have any cactus currently, but I do have 4 bottles of tequila. As it's parsing the ingredients, if you have the completed items, could/should it list that? The should part is because maybe you really do want to make another item... ingredients and recipe don't work with a quantity, which would make that level of ingredient planning both more complicated, and more useful (maybe).
You are correct. As coded, it completely "flattens" the ingredient list. Do I understand that you'd like it to stop recursing as soon as it gets to an ingredient that you have available?

2) Should it say when a special recipe is required? The "recipe russian ice" just says that it's a fancy drink, not that it actually has a recipe needed to make it.
It could do that - and tell you if you know the recipe. ConcoctionDatabase.mixingMethodDescription()...

3) Any way to get this into ash? Most of it is available through get_ingredients, but I don't think there's any standardized way to easily check for recipes, special combining methods, skills, etc. Some way of knowing what the special needs to finish a combination would be awesome.
See this feature request

4) Should the fuzzy item matcher work on this in the 'normal' way?
Yeah, it should.

I'm going to reopen this, call what is in there "version 0.1", and let other people soup it up. :)
 

Veracity

Developer
Staff member
I can't stop - but I am about to leave the house, so I will stop. :)

Revision 9590 fixes #1 and #4:

- the ingredients command stops recursing as soon as it hits an item you have available. (The recipes command still shows you the maximum creation depth).
- the fuzzy matcher is invoked as normal
 

Winterbay

Active member
Yay! This is a wonderful command.

Edit: No more needing to go to the wiki to remember how to make something :)
 
Top