mirror of
https://github.com/minetest-mods/moreores.git
synced 2025-07-04 00:50:43 +02:00
Add toolranks support
This commit is contained in:
@ -30,4 +30,5 @@ read_globals = {
|
|||||||
"frame",
|
"frame",
|
||||||
"intllib",
|
"intllib",
|
||||||
"mg",
|
"mg",
|
||||||
|
"toolranks",
|
||||||
}
|
}
|
||||||
|
8
init.lua
8
init.lua
@ -232,6 +232,14 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
end
|
end
|
||||||
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)
|
minetest.register_alias(tool_name .. tool_post, fulltool_name)
|
||||||
if use_frame then
|
if use_frame then
|
||||||
frame.register(fulltool_name)
|
frame.register(fulltool_name)
|
||||||
|
Reference in New Issue
Block a user