mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 06:43:17 -04:00
Add support for toolranks mod
- [toolranks mod](https://github.com/lisacvuk/minetest-toolranks)
This commit is contained in:
parent
176ddba176
commit
2cd6c765a3
2 changed files with 13 additions and 0 deletions
|
@ -3,6 +3,9 @@
|
|||
-- support for MT game translation.
|
||||
local S = farming.get_translator
|
||||
|
||||
-- optional support for toolranks mod
|
||||
local use_toolranks = minetest.get_modpath("toolranks")
|
||||
|
||||
-- Wear out hoes, place soil
|
||||
-- TODO Ignore group:flower
|
||||
farming.registered_plants = {}
|
||||
|
@ -100,6 +103,15 @@ farming.register_hoe = function(name, def)
|
|||
groups = def.groups,
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
-- toolranks optional support
|
||||
if use_toolranks then
|
||||
minetest.override_item(name:sub(2), {
|
||||
original_description = def.description,
|
||||
description = toolranks.create_description(def.description, 0, 1),
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
end
|
||||
|
||||
-- Register its recipe
|
||||
if def.recipe then
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
name = farming
|
||||
description = Minetest Game mod: farming
|
||||
depends = default, wool, stairs
|
||||
optional_depends = toolranks
|
||||
|
|
Loading…
Add table
Reference in a new issue