2020-06-18 13:37:21 +02:00
|
|
|
# minetest-toolranks [toolranks]
|
|
|
|
|
2017-07-09 17:39:47 +02:00
|
|
|
Minetest tool ranks mod
|
2017-07-10 13:08:07 +02:00
|
|
|
|
2020-06-18 13:37:21 +02:00
|
|
|
Tools gain levels for digging nodes. Higher level tools dig faster and take longer to wear out.
|
2017-07-13 15:12:49 +02:00
|
|
|
|
2022-10-04 13:35:43 +02:00
|
|
|
## Licence
|
|
|
|
Code: LGPLv2.1+
|
|
|
|
Tool level sound: [CC BY 3.0](https://freesound.org/people/MakoFox/sounds/126422/)
|
|
|
|
|
2017-07-13 15:12:49 +02:00
|
|
|
## Are you a mod developer?
|
2020-06-18 13:37:21 +02:00
|
|
|
|
2017-07-13 15:12:49 +02:00
|
|
|
Does one of your mods add new tools?
|
2020-06-18 13:37:21 +02:00
|
|
|
If so, to support this mod, add this code to your mod, after your tool's code:
|
|
|
|
|
|
|
|
```lua
|
|
|
|
if minetest.get_modpath("toolranks") then
|
|
|
|
minetest.override_item("mymod:mytool", {
|
|
|
|
original_description = "My Tool",
|
2020-06-20 14:41:30 +02:00
|
|
|
description = toolranks.create_description("My Tool"),
|
2020-06-18 13:37:21 +02:00
|
|
|
after_use = toolranks.new_afteruse
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
```
|
|
|
|
|
|
|
|
Or alternatively, you can use the helper function:
|
|
|
|
|
|
|
|
```lua
|
|
|
|
toolranks.add_tool("mymod:mytool")
|
|
|
|
```
|