mirror of
https://github.com/louisroyer/minetest-toolranks-extras.git
synced 2024-11-05 07:03:47 +01:00
Add mod information
This commit is contained in:
parent
1f2b4cc0dc
commit
376e596f17
17
init.lua
17
init.lua
@ -1,12 +1,21 @@
|
||||
local MP = minetest.get_modpath("toolranks_extras")
|
||||
local enable_farming_tools = minetest.settings:get_bool("toolranks_extra.farming", true)
|
||||
local use_farming = minetest.get_modpath("farming")
|
||||
|
||||
toolranks_extras = {}
|
||||
|
||||
-- mod information
|
||||
toolranks_extras.mod = {version = "1.1", author = "Louis Royer"}
|
||||
|
||||
-- settings
|
||||
toolranks_extras.settings =
|
||||
{enable_farming_tools = minetest.settings:get_bool("toolranks_extra.farming", true)}
|
||||
|
||||
-- mods detection
|
||||
local use_farming = minetest.get_modpath("farming")
|
||||
-- farming redo (https://notabug.org/tenplus1/farming)
|
||||
-- already implements toolranks support
|
||||
local use_farming_redo = (farming.mod == "redo")
|
||||
local use_farming_redo = use_farming and (farming.mod == "redo") or false
|
||||
|
||||
|
||||
if use_farming and (not use_farming_redo) and enable_farming_tools then
|
||||
if use_farming and (not use_farming_redo) and toolranks_extras.settings.enable_farming_tools then
|
||||
dofile(MP.."/hoe.lua")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user