mirror of
https://github.com/louisroyer/minetest-toolranks-extras.git
synced 2024-09-28 15:50:57 +02:00
Add compatibility with farming redo
This commit is contained in:
parent
87d3108a67
commit
7c457d322d
@ -1,5 +1,7 @@
|
|||||||
# minetest-toolranks-extras
|
# minetest-toolranks-extras
|
||||||
This minetest mod adds [toolranks](https://github.com/lisacvuk/minetest-toolranks) support for `minetest-games`’s mods (except `default`).
|
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
|
## License
|
||||||
- CC0-1.0, Louis Royer 2020
|
- CC0-1.0, Louis Royer 2020
|
||||||
|
10
init.lua
10
init.lua
@ -1,6 +1,12 @@
|
|||||||
local MP = minetest.get_modpath("toolranks_extras")
|
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")
|
dofile(MP.."/hoe.lua")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user