Amount of items was not shown correct sometimes. Reason was that a number was read from metadata, but metadata don't seems to update instantly so it was wrong. Reorganized code and added a minetest.after call to prevent stack overflow because of recursive function calls.
I completely forgot that i need to preserve the wear and metadata when the crafting recipe is copied to the crafting grid.
Leads to repaired tools and lost item metadata. Should now be fixed.
Save items and their amounts in a table when they are requested the first time and then load it from there.
Also commented out the log output of a complete recipe because it spams logs too much.
Added a bit more comments and made search field a little bit longer.
IGNORE PREVIOUS COMMIT, I PASTED WRONG
Save items and their amounts in a table when they are requested the first time and then load it from there.
Also commented out the log output of a complete recipe because it spams logs too much.
Added a bit more comments and made search field a little bit longer.
Shows recipes of machines from technic mod, too. This includes recipes for grinder, compressor, extractor, alloy furnace and centrifuge.
Should work with old and new versions of technic mod.
Also added code to better handle aliases which occur in recipes.
Shows recipes from grinder, alloy furnace, extractor, compressor and centrifuge in craft guide, if technic mod is loaded.
Not tested with newest version of technic mod at the moment!
Second, craft guide now shows crafts of type fuel (default is, to show fuel recipes only when there are other craft types for this item).
Although added some function to not display crafts with slabs, panels, microblocks, etc... added by moreblocks mod.
Fixed: search text should now stay there when craft guide is closed.
removes much copy&paste code, saving items in tables instead of inventory slots for "you need:" feature, and it includes a fix to save the text entered in search field
- no unknown items shown when recipes have "group:..." inside, there is then instead a button displayed which shows all items in this group when you press it.
- added a new feature to show the complete list of items you need for a item. For example: output: default:bookshelf,
then it shows: 6 "group:wood", 27 "papyrus". This feature was the most work. I hope it works, but no guarantee.(It could lead to huge for loops which it doesn't exit when recipes are very compex. Also needs to be tested which more mods.)
- you can direct change from last page to first page and from first page to last page now
- added a button to exit the formspec
- crafting recipe for craft guide changed to use group:stick
- crafting recipe for craft guide pc changed to use just the recipe with stone slabs