Feature create() function supporting multi-recipe items

beldur

New member
For items that are creatable by multiple methods (such as the recent batteries battery (9-Volt), battery (lantern), and battery (car)), the create function only uses the first recipe listed to achieve the target crafting result.

For example, if your only batteries are a battery (lantern) and a battery (AAA), and you create(1, $item[battery (car)]);, it'll fail despite battery (lantern) + battery (AAA) being on the recipe list for a battery (car). It seeks to use the battery (D) + battery (D) = battery (car) recipe, regardless of the items available.

I don't know the feasibility of changing this to check through each recipe for a given item before failing, but it would be handy if it worked that way.
 
Last edited:

lostcalpolydude

Developer
Staff member
It is currently impossible to have multiple supported recipes for a single end result. Perhaps someone will be motivated to refactor the underlying code and make that work, but so far that limitation has persisted through at least one major revamp of crafting code.
 

VladYvhuce

Member
It is currently impossible to have multiple supported recipes for a single end result. Perhaps someone will be motivated to refactor the underlying code and make that work, but so far that limitation has persisted through at least one major revamp of crafting code.
Hmm... So, is that why Mafia's item manager doesn't show Battery (Car) as craftable in the item manager tab, if you don't have Battery (AAA)?
 
Top