Add mod information

This commit is contained in:
Louis 2020-02-19 09:30:42 +01:00
parent 1f2b4cc0dc
commit 376e596f17

@ -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