Add toolranks support (#37)

* Add toolranks support

* Update the changelog for `toolranks` support
This commit is contained in:
OgelGames
2019-12-30 22:29:25 +11:00
committed by Hugo Locurcio
parent 7ea70d5595
commit 3c44a9be58
4 changed files with 14 additions and 1 deletions

View File

@ -232,6 +232,14 @@ local function add_ore(modname, description, mineral_name, oredef)
end
end
-- Toolranks support
if minetest.get_modpath("toolranks") then
minetest.override_item(fulltool_name, {
original_description = tdef.description,
description = toolranks.create_description(tdef.description, 0, 1),
after_use = toolranks.new_afteruse})
end
minetest.register_alias(tool_name .. tool_post, fulltool_name)
if use_frame then
frame.register(fulltool_name)