Add compatibility with farming redo

This commit is contained in:
Louis 2020-02-12 13:07:25 +01:00
parent 87d3108a67
commit 7c457d322d
2 changed files with 10 additions and 2 deletions

@ -1,5 +1,7 @@
# minetest-toolranks-extras
This minetest mod adds [toolranks](https://github.com/lisacvuk/minetest-toolranks) support for `minetest-games`s mods (except `default`).
This mod currently add support for hoes from `farming` mod.
This mod is compatible with [farming redo](https://notabug.org/tenplus1/farming) (nothing breaks if you have both installed).
## License
- CC0-1.0, Louis Royer 2020

@ -1,6 +1,12 @@
local MP = minetest.get_modpath("toolranks_extras")
local use_mtg_farming = minetest.get_modpath("farming")
local enable_farming_tools = minetest.settings:get_bool("toolranks_extra.farming", true)
local use_farming = minetest.get_modpath("farming")
if use_mtg_farming and minetest.settings:get_bool("toolranks_extra.farming", true) then
-- farming redo (https://notabug.org/tenplus1/farming)
-- already implements toolranks support
local use_farming_redo = (farming.mod == "redo")
if use_farming and (not use_farming_redo) and enable_farming_tools then
dofile(MP.."/hoe.lua")
end