This mod converts crafting recipes from Minetest format to Repixture format, making it easier for mods to support Repixture.
You can use this mod as a library, or have it automatically convert all registered recipes.
Library Use
You can register a crafting recipe for both Minetest and Repixture by using
rp_craftcompat.register_craft()
in place of minetest.register_craft()
.
The easiest way to do this is to keep a local reference to the function:
local register_craft = minetest.get_modpath('rp_craftcompat') and rp_craftcompat.register_craft or minetest.register_craft;
Alternatively, you can manually convert a Minetest crafting recipe to
Repixture format using rp_craftcompat.convert_recipe()
.
Automatic Conversion
This mod also has an option to automatically convert all crafting recipes
registered with minetest.register_craft()
to Repixture's crafting system.
For automatic conversion, this mod does not need to be listed as a dependency.
Very useful
There are so many mods that work in any game, but a lot of them do not explicitly support RePixture for crafting! The automatic conversion allows me to play a lot of mods in RP that I wouldn't have been able to otherwise. I kinda wish this was built-in to RePixture.
As for using it as a library, that seems good but I'll probably manually do crafting to allow me to balance the crafting according to the game. (in my mod drwho_tardis).