Make axe craft work in the same manner as other crafts
This commit is contained in:
parent
9f3d65551c
commit
745e1dacd4
22
init.lua
22
init.lua
@ -1,24 +1,22 @@
|
||||
-- Reverse all MTG axe recipes
|
||||
local craft_ingreds = {
|
||||
wood = "group:wood",
|
||||
stone = "group:stone",
|
||||
steel = "default:steel_ingot",
|
||||
bronze = "default:bronze_ingot",
|
||||
mese = "default:mese_crystal",
|
||||
diamond = "default:diamond"
|
||||
}
|
||||
|
||||
for name, mat in pairs(craft_ingreds) do
|
||||
local function register_axe_craft(name, material)
|
||||
minetest.register_craft({
|
||||
output = "default:axe_" .. name,
|
||||
recipe = {
|
||||
{mat, mat},
|
||||
{"group:stick", mat},
|
||||
{material, material},
|
||||
{"group:stick", material},
|
||||
{"group:stick", ""}
|
||||
}
|
||||
});
|
||||
end
|
||||
|
||||
register_axe_craft("wood", "group:wood");
|
||||
register_axe_craft("stone", "default:stone");
|
||||
register_axe_craft("bronze", "default:bronze_ingot");
|
||||
register_axe_craft("steel", "default:steel_ingot");
|
||||
register_axe_craft("mese", "default:mese");
|
||||
register_axe_craft("diamod", "default:diamod");
|
||||
|
||||
-- Extend farming.register_hoe with a reversed recipe
|
||||
local function register_hoe_craft(name, material)
|
||||
minetest.register_craft({
|
||||
|
Loading…
x
Reference in New Issue
Block a user