This minetest mod extends toolranks.
Go to file
pre-commit-ci[bot] 4bd8313073
[pre-commit.ci] pre-commit autoupdate (#22)
updates:
- [github.com/lunarmodules/luacheck: v1.1.2 → v1.2.0](https://github.com/lunarmodules/luacheck/compare/v1.1.2...v1.2.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-27 20:23:33 +02:00
.github Run luacheck from pre-commit 2022-06-21 21:41:40 +02:00
locale Extends API to allow redefinition of "Node dug" display 2020-08-11 16:04:14 +02:00
.gitattributes Update to github action 2022-06-21 13:39:54 +02:00
.gitignore Pass travis build 2020-02-21 01:37:53 +01:00
.luacheckrc Fix luacheck 2020-08-12 21:44:57 +02:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#22) 2024-05-27 20:23:33 +02:00
hoe.lua Fix crash when using hoe but not on a node 2020-08-19 15:12:08 +02:00
init.lua Fix crash when using hoe but not on a node 2020-08-19 15:12:08 +02:00
LICENSE Initial commit 2020-02-12 09:38:08 +01:00
mod.conf Extends API to allow redefinition of "Node dug" display 2020-08-11 16:04:14 +02:00
README.md Run luacheck from pre-commit 2022-06-21 21:41:40 +02:00
screenshot.png Add screenshot 2020-03-07 14:56:08 +01:00
settingtypes.txt Fix #2 2020-08-11 03:34:24 +02:00
tool_types.lua Extends API to allow redefinition of "Node dug" display 2020-08-11 16:04:14 +02:00

Toolranks Extras

ContentDB ContentDB

This minetest mod extends toolranks. It adds support for minetest-gamess mods (except default). This mod currently adds support for hoes from farming mod. This mod is compatible with farming redo (nothing breaks if you have both installed).

This mod also adds an API to register new types of tools for toolranks.

API

--[[
--   `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)
--]]
toolranks_extras.register_tool_type(keyword, tool_type, [node_dug_display])

-- example
toolranks_extras.register_tool_type("battle_axe", S("battle axe"))
toolranks_extras.register_tool_type("bow", S("bow"), S("Arrows thrown"))

Screenshot

License

  • CC0-1.0, Louis Royer 2020

Settings

  • Settings are available to disable support of some mods (currently only farming). This is useful if you want to reimplement minetest-games modules 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).
  • Extras tool types registering can be disabled (registering function will still be available, but will do nothing).