mirror of
https://github.com/louisroyer/minetest-toolranks-extras.git
synced 2024-11-05 07:03:47 +01:00
Add compatibility with farming redo
This commit is contained in:
parent
87d3108a67
commit
7c457d322d
@ -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
|
||||
|
10
init.lua
10
init.lua
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user