diff --git a/.luacheckrc b/.luacheckrc index 68dfa6c..1c51591 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -38,5 +38,6 @@ read_globals = { "advtrains", "letters", "player_monoids", "pipeworks", "planetoidgen", - "xban", "beerchat", "drawers" + "xban", "beerchat", "drawers", + "toolranks", } diff --git a/init.lua b/init.lua index 852ad08..63551d5 100644 --- a/init.lua +++ b/init.lua @@ -219,4 +219,9 @@ end if minetest.get_modpath("drawers") then dofile(MP.."/chat/drawers_fix.lua") -end \ No newline at end of file +end + +-- extra toolranks support +if minetest.get_modpath("toolranks") then + dofile(MP.."/toolranks.lua") +end diff --git a/mod.conf b/mod.conf index d7d3473..46fd606 100644 --- a/mod.conf +++ b/mod.conf @@ -46,8 +46,10 @@ stamina, technic, technic_cnc, telemosaic, +toolranks, travelnet, unified_inventory, vacuum, +vines, xp_redo """ diff --git a/toolranks.lua b/toolranks.lua new file mode 100644 index 0000000..8419f8a --- /dev/null +++ b/toolranks.lua @@ -0,0 +1,23 @@ + +-- Battleaxe + +if minetest.get_modpath("castle_weapons") then + local desc = minetest.registered_tools["castle_weapons:battleaxe"].description + minetest.override_item("castle_weapons:battleaxe", { + description = toolranks.create_description(desc, 0, 1), + original_description = desc, + after_use = toolranks.new_afteruse + }) +end + + +-- Vine shears + +if minetest.get_modpath("vines") then + local desc = minetest.registered_tools["vines:shears"].description + minetest.override_item("vines:shears", { + description = toolranks.create_description(desc, 0, 1), + original_description = desc, + after_use = toolranks.new_afteruse + }) +end