2018-04-22 23:18:59 +02:00
|
|
|
--[[
|
|
|
|
**********************************************
|
2018-12-25 01:01:52 +01:00
|
|
|
*** Cucina Vegana ***
|
|
|
|
*** ***
|
|
|
|
*** Cucina Vegana is a Mod for Minetest ***
|
|
|
|
*** and supports farming or farming_redo ***
|
|
|
|
*** by TenPlus. ***
|
|
|
|
*** ***
|
|
|
|
*** License: LGPL 3.0 by A.C.M. ***
|
|
|
|
*** ***
|
2018-04-22 23:18:59 +02:00
|
|
|
**********************************************
|
|
|
|
]]--
|
|
|
|
|
2019-07-02 21:38:03 +02:00
|
|
|
cucina_vegana = {}
|
2020-03-04 21:18:20 +01:00
|
|
|
cucina_vegana.version = "2.6"
|
2019-07-02 21:38:03 +02:00
|
|
|
cucina_vegana.farming_default = true
|
|
|
|
cucina_vegana.plant_settings = {}
|
|
|
|
cucina_vegana.plant_settings.bonemeal_list = {}
|
2020-03-04 21:18:20 +01:00
|
|
|
cucina_vegana.farming_ng = minetest.get_modpath("farming_nextgen")
|
|
|
|
cucina_vegana.plant_settings.germ_launch = 0
|
|
|
|
cucina_vegana.modname = minetest.get_current_modname()
|
2018-05-16 19:28:05 +02:00
|
|
|
|
2018-04-22 23:18:59 +02:00
|
|
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
2020-03-04 21:18:20 +01:00
|
|
|
local modname = cucina_vegana.modname
|
2018-04-22 23:18:59 +02:00
|
|
|
|
2019-07-14 16:21:48 +02:00
|
|
|
dofile(modpath .. "/settings.lua")
|
2019-07-02 23:22:47 +02:00
|
|
|
dofile(modpath .. "/tools.lua")
|
2019-11-21 17:24:41 +01:00
|
|
|
local S
|
|
|
|
|
|
|
|
if(minetest.get_modpath("intllib")) then
|
|
|
|
S = dofile(modpath .."/intllib.lua")
|
2019-12-28 03:59:51 +01:00
|
|
|
print("[MOD] " .. modname .. ": translating in intllib-mode.")
|
2019-12-28 03:46:36 +01:00
|
|
|
|
2020-03-04 21:18:20 +01:00
|
|
|
elseif minetest.get_translator ~= nil then
|
2019-11-21 17:24:41 +01:00
|
|
|
S = minetest.get_translator("cucina_vegana")
|
|
|
|
print("[MOD] " .. modname .. ": translating in minetest-mode.")
|
2019-12-28 03:46:36 +01:00
|
|
|
|
2020-03-04 21:18:20 +01:00
|
|
|
else
|
|
|
|
S = function ( s ) return s end
|
2020-03-11 06:04:39 +01:00
|
|
|
|
2019-11-21 17:24:41 +01:00
|
|
|
end -- if(minetest.get_modpath(
|
|
|
|
|
|
|
|
cucina_vegana.get_translator = S
|
2019-04-29 01:36:06 +02:00
|
|
|
|
2018-05-16 19:28:05 +02:00
|
|
|
-- looking if farming_redo is activ?
|
2018-12-26 22:48:38 +01:00
|
|
|
if(farming.mod == "redo") then
|
2019-07-02 21:38:03 +02:00
|
|
|
cucina_vegana.farming_default = false
|
2019-01-13 20:14:07 +01:00
|
|
|
minetest.log("info", "[MOD] " .. modname .. ": farming_redo mode activated.")
|
|
|
|
|
|
|
|
else
|
|
|
|
minetest.log("info", "[MOD] " .. modname .. ": default farming mode activated.")
|
|
|
|
|
2019-05-01 16:32:38 +02:00
|
|
|
end -- if(farming.mod
|
2018-05-16 19:28:05 +02:00
|
|
|
|
2019-07-02 21:38:03 +02:00
|
|
|
cucina_vegana.plant_settings.bonemeal = false -- Support for bonemeal disabled
|
2019-05-01 18:05:53 +02:00
|
|
|
if(minetest.get_modpath("bonemeal")) then
|
2019-07-02 21:38:03 +02:00
|
|
|
cucina_vegana.plant_settings.bonemeal = true
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2019-05-01 18:05:53 +02:00
|
|
|
end -- if(minetest.get_modpath("bonemeal"
|
2019-01-13 20:14:07 +01:00
|
|
|
|
2019-07-17 22:44:09 +02:00
|
|
|
local plants = {
|
2018-05-02 17:36:51 +02:00
|
|
|
|
2019-07-02 21:38:03 +02:00
|
|
|
["asparagus"] = cucina_vegana.plant_settings.asparagus,
|
|
|
|
["chives"] = cucina_vegana.plant_settings.chives,
|
|
|
|
["flax"] = cucina_vegana.plant_settings.flax,
|
|
|
|
["kohlrabi"] = cucina_vegana.plant_settings.kohlrabi,
|
|
|
|
["lettuce"] = cucina_vegana.plant_settings.lettuce,
|
|
|
|
["parsley"] = cucina_vegana.plant_settings.parsley,
|
|
|
|
["peanut"] = cucina_vegana.plant_settings.peanut,
|
|
|
|
["rosemary"] = cucina_vegana.plant_settings.rosemary,
|
|
|
|
["rice"] = cucina_vegana.plant_settings.rice,
|
|
|
|
["soy"] = cucina_vegana.plant_settings.soy,
|
|
|
|
["sunflower"] = cucina_vegana.plant_settings.sunflower,
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-05-02 17:36:51 +02:00
|
|
|
}
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-04-22 23:18:59 +02:00
|
|
|
|
2019-05-01 16:32:38 +02:00
|
|
|
|
2018-05-04 00:42:56 +02:00
|
|
|
for pname, value in pairs(plants) do
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-05-16 19:28:05 +02:00
|
|
|
if(value) then
|
2019-05-01 16:32:38 +02:00
|
|
|
-- Load all flowers in default-mode
|
2019-07-02 21:38:03 +02:00
|
|
|
if (cucina_vegana.farming_default) then
|
2018-05-16 19:28:05 +02:00
|
|
|
dofile(modpath .. "/" .. pname .. "_default.lua")
|
|
|
|
dofile(modpath .. "/".. pname .. ".lua")
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-05-16 19:28:05 +02:00
|
|
|
else
|
2019-05-01 16:32:38 +02:00
|
|
|
-- Load all flowers in redo-mode
|
2018-05-16 19:28:05 +02:00
|
|
|
dofile(modpath .. "/" .. pname .. "_redo.lua")
|
|
|
|
dofile(modpath .. "/".. pname .. ".lua")
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-05-16 19:28:05 +02:00
|
|
|
end -- if(cucina_vegana...)
|
|
|
|
|
|
|
|
end -- if(value)
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2019-01-13 20:14:07 +01:00
|
|
|
print("[MOD] " .. modname .. " Module: " .. pname .. " loaded.")
|
|
|
|
minetest.log("info", "[MOD] " .. modname .. " Module: " .. pname .. " loaded.")
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-05-04 00:42:56 +02:00
|
|
|
end -- for
|
2018-04-22 23:18:59 +02:00
|
|
|
|
2018-04-24 01:07:58 +02:00
|
|
|
-- Insert Recipes
|
2019-01-13 20:14:07 +01:00
|
|
|
dofile(modpath .. "/overrides.lua")
|
2018-05-04 01:05:36 +02:00
|
|
|
dofile(modpath .. "/nodes.lua")
|
|
|
|
dofile(modpath .. "/items.lua")
|
|
|
|
dofile(modpath .. "/fuels.lua")
|
2018-04-24 01:07:58 +02:00
|
|
|
dofile(modpath .. "/recipes.lua")
|
2018-05-04 01:05:36 +02:00
|
|
|
dofile(modpath .. "/recipes_cook.lua")
|
2018-05-11 13:02:26 +02:00
|
|
|
dofile(modpath .. "/recipes_support.lua")
|
2019-02-14 16:45:33 +01:00
|
|
|
dofile(modpath .. "/recipes_5xx.lua") -- New recipes with MT 5.0
|
2019-01-06 17:20:25 +01:00
|
|
|
dofile(modpath .. "/register_mods.lua")
|
2018-05-26 01:27:43 +02:00
|
|
|
|
2019-07-02 21:38:03 +02:00
|
|
|
if(cucina_vegana.plant_settings.bonemeal) then
|
|
|
|
bonemeal:add_crop(cucina_vegana.plant_settings.bonemeal_list)
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2019-07-02 21:38:03 +02:00
|
|
|
end -- if(cucina_vegana.plant_settings.bonemeal
|
2019-05-01 18:05:53 +02:00
|
|
|
|
2019-07-02 21:38:03 +02:00
|
|
|
if (cucina_vegana.farming_default) then
|
|
|
|
print("[MOD] " .. modname .. " Version " .. cucina_vegana.version .. " in default-mode loaded.")
|
|
|
|
minetest.log("info", "[MOD] " .. modname .. " Version " .. cucina_vegana.version .. " in default-mode loaded.")
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-05-16 19:28:05 +02:00
|
|
|
else
|
2019-07-02 21:38:03 +02:00
|
|
|
print("[MOD] " .. modname .. " Version " .. cucina_vegana.version .. " in redo-mode loaded.")
|
|
|
|
minetest.log("info", "[MOD] " .. modname .. " Version " .. cucina_vegana.version .. " in redo-mode loaded.")
|
2019-07-16 22:59:13 +02:00
|
|
|
|
2018-05-16 19:28:05 +02:00
|
|
|
end
|