1234567891011121314151617181920 |
- local recipes = {}
- repairing_anvils.recipes = recipes
- function repairing_anvils.register_recipe(input, output)
- assert(type(input) == "string",
- "Error registering anvil recipe: Input must be a string, was " ..
- type(input))
- assert(type(output) == "string" or
- type(output) == "function",
- "Error registering anvil recipe: output must be a string of function, was" ..
- type(output))
- assert(not recipes[input], "There is already an anvil recipe registered for " ..
- input)
- recipes[minetest.registered_aliases[input] or input] =
- minetest.registered_aliases[output] or output
- end
|