remove mods tool, add ability for default axes to strip trees

This commit is contained in:
wsor 2020-11-04 20:42:43 -05:00
parent 060c943076
commit 9fdcb7439a

@ -19,14 +19,15 @@ for _, name in ipairs(trunk_names) do
}) })
end end
--Register tool --list of axes to override
minetest.register_tool("chisel_tree:chisel", { local axe_types = {
description = "A chisel for wood", "wood", "stone", "bronze", "steel", "mese", "diamond",
inventory_image = "chisel.png", }
wield_image = "chisel.png",
sound = {breaks = "default_tool_breaks"}, for _, axe_name in ipairs(axe_types) do
stack_max = 1,
on_use = function(itemstack, user, pointed_thing) minetest.override_item("default:axe_" .. axe_name, {
on_place = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then if pointed_thing.type ~= "node" then
return return
@ -55,15 +56,10 @@ minetest.register_tool("chisel_tree:chisel", {
end, end,
}) })
end
--Register craft --register alias to support old tool
minetest.register_craft({ minetest.register_alias("chisel_tree:chisel", "default:axe_steel")
output = "chisel_tree:chisel",
recipe = {
{"", "default:steel_ingot", ""},
{"", "group:fence", ""},
}
})