CleverRaven/Cataclysm-DDA — pull request #8347 by Robik81 (2014-07-27 16:06:49+00:00)
Title: [WIP][CR] Craftting - mutliple results / byproducts

I am working on crafting expansion. Goal is to be able to define multiple results for recipe without forced redefinition of any existing ones.

You can set byproducts in json like this (also used as testing recipe):
{
"type" : "recipe",
"result": "water",
"byproducts" : "towel",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"difficulty": 0,
"time": 2000,
"reversible": false,
"autolearn": true,
"components": [
[
[ "towel_wet", 1 ]
]
]
}

"byproducts" con be either one value of array of values.

I have working prototype, which have these limitations:
* crafting ui does not show any info about byproducts
* you cannot specify charges / amount of byproduct
* if there is multiple types liquid results in recipe, check for containers is not good enough at the moment
* you can define reverse process for main result, but not for byproducts (this one is fine, I do not plan to change that)

I did test crafting of nail, and of new recipe... no extensive testing yet.

I would like to know your opinions and suggestions and also if there is a chance to get something like this in the mainline, provided I polish and finish it, of course.