minetest-toolranks-extras/README.md

36 lines
1.9 KiB
Markdown
Raw Normal View History

2020-08-12 17:34:36 +02:00
# minetest-toolranks-extras
[![Build Status](https://travis-ci.org/louisroyer/minetest-toolranks-extras.svg?branch=master)](https://travis-ci.org/louisroyer/minetest-toolranks-extras) [![ContentDB](https://content.minetest.net/packages/louisroyer/toolranks_extras/shields/title/)](https://content.minetest.net/packages/louisroyer/toolranks_extras/) [![ContentDB](https://content.minetest.net/packages/louisroyer/toolranks_extras/shields/downloads/)](https://content.minetest.net/packages/louisroyer/toolranks_extras/)
2020-02-21 01:47:24 +01:00
2020-08-11 03:34:24 +02:00
This minetest mod extends [toolranks](https://github.com/lisacvuk/minetest-toolranks). It adds support for `minetest-games`s mods (except `default`).
2020-02-12 13:13:10 +01:00
This mod currently adds support for hoes from `farming` mod.
2020-02-12 13:07:25 +01:00
This mod is compatible with [farming redo](https://notabug.org/tenplus1/farming) (nothing breaks if you have both installed).
2020-02-12 12:22:40 +01:00
2020-08-11 03:34:24 +02:00
This mod also adds an API to register new types of tools for toolranks.
## API
```lua
--[[
-- `keyword` is a string to be detected in tool description
-- `tool_type` is a localized tool type (if nil, then unregister the keyword)
-- `node_dug_display` is an (optional) alternative localized display
-- of "Node Dug" (if false, then unregister the display)
2020-08-11 03:34:24 +02:00
--]]
toolranks_extras.register_tool_type(keyword, tool_type, [node_dug_display])
2020-08-11 03:34:24 +02:00
-- example
toolranks_extras.register_tool_type("battle_axe", S("battle axe"))
toolranks_extras.register_tool_type("bow", S("bow"), S("Arrows thrown"))
2020-08-11 03:34:24 +02:00
```
2020-03-07 14:56:08 +01:00
![Screenshot](screenshot.png)
2020-02-12 12:22:40 +01:00
## License
- CC0-1.0, Louis Royer 2020
2020-02-12 13:13:10 +01:00
## Settings
2020-08-11 03:34:24 +02:00
- Settings are available to disable support of some mods (currently only `farming`). This is useful if you want to reimplement minetest-games modules
2020-02-12 13:13:10 +01:00
with a `toolranks` support. It is also possible to ask me to automatically disabling support if your mod is detected (like it is done with farming redo).
2020-08-11 03:34:24 +02:00
- Extras tool types registering can be disabled (registering function will still be available, but will do nothing).