minetest-mods / craftguide

:book: The most comprehensive Crafting Guide on Minetest
Other
43 stars 20 forks source link

Fixes #42

Closed p-ouellette closed 5 years ago

p-ouellette commented 5 years ago

The previous group_to_item resulted in the invalid recipe rose + wool --> red wool being shown. It also didn't break out of the loop after finding a match.

get_item_usages now returns recipes with matching groups which means tools with a group:stick handle will be shown in the usages for stick.

Plus some other fixes, see the commits.

kilbith commented 5 years ago

the invalid recipe rose + wool --> red wool being shown

Current master: screenshot_20190107_143947

p-ouellette commented 5 years ago

I am seeing flowers in the recipes for red, white, and yellow wool. Probably a difference in the order of minetest.registered_items. The current code is wrong because for groupstrings like group:dye,color_red only the last group is checked.

kilbith commented 5 years ago

Merged with some modifications, thanks.

https://github.com/minetest-mods/craftguide/commit/7f6dd430ce59ef749324413ffc908dec43b7331e