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
|
-- Reverse all MTG axe recipes
|
||||||
local craft_ingreds = {
|
local function register_axe_craft(name, material)
|
||||||
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
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "default:axe_" .. name,
|
output = "default:axe_" .. name,
|
||||||
recipe = {
|
recipe = {
|
||||||
{mat, mat},
|
{material, material},
|
||||||
{"group:stick", mat},
|
{"group:stick", material},
|
||||||
{"group:stick", ""}
|
{"group:stick", ""}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
end
|
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
|
-- Extend farming.register_hoe with a reversed recipe
|
||||||
local function register_hoe_craft(name, material)
|
local function register_hoe_craft(name, material)
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user