2018-09-24 08:55:45 -07:00
|
|
|
|
|
|
|
--[[
|
|
|
|
Farming settings can be changed here and kept inside mod folder
|
|
|
|
even after the mod has been updated, or you can place inside
|
|
|
|
world folder for map specific settings.
|
|
|
|
--]]
|
|
|
|
|
2018-10-22 22:30:18 -07:00
|
|
|
local viscosity=1
|
|
|
|
local wilt_removal_time=20
|
2018-09-30 22:36:43 -07:00
|
|
|
|
|
|
|
if minetest.settings:get("farming.rarety") then
|
|
|
|
farming.config:set_float("rarety",minetest.settings:get("farming.rarety"))
|
|
|
|
end
|
2018-10-22 22:30:18 -07:00
|
|
|
if minetest.settings:get("farming.viscosity") then
|
|
|
|
farming.config:set_int("viscosity",minetest.settings:get("farming.viscosity"))
|
|
|
|
else
|
|
|
|
farming.config:set_int("viscosity",viscosity)
|
|
|
|
end
|
2018-09-24 08:55:45 -07:00
|
|
|
|
|
|
|
-- rarety of crops on map, default is 0.001 (higher number = more crops)
|
2018-09-30 22:36:43 -07:00
|
|
|
farming.rarety = farming.config:get_float("rarety") or 0.002
|
2018-10-05 04:42:52 -07:00
|
|
|
-- random waiting time for growing
|
2018-10-23 22:27:11 -07:00
|
|
|
farming.wait_min = farming.config:get_int("wati_min") or 10
|
|
|
|
farming.wait_max = farming.config:get_int("wati_max") or 20
|
2018-10-22 22:30:18 -07:00
|
|
|
farming.wilt_removal_time = wilt_removal_time or 60
|
|
|
|
farming.wilt_time = 5
|
2018-10-23 05:52:50 -07:00
|
|
|
farming.min_light = 14
|
2018-09-24 08:55:45 -07:00
|
|
|
|
|
|
|
-- node type, where grain can be randomly found
|
2018-09-25 22:48:13 -07:00
|
|
|
farming.change_soil = {}
|
|
|
|
local test_soil = {"default:dirt","default:dirt_with_grass","default:dirt_with_dry_grass","default:dirt_with_rainforest_litter",
|
2018-09-24 08:55:45 -07:00
|
|
|
"default:dirt_with_coniferous_litter","default:permafrost_with_moss"}
|
2018-09-25 22:48:13 -07:00
|
|
|
for i,s in ipairs(test_soil) do
|
|
|
|
if minetest.registered_nodes[s] ~= nil then
|
|
|
|
table.insert(farming.change_soil,s)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
farming.change_soil_desert = {}
|
|
|
|
local test_soil = {"default:desert_sand"}
|
|
|
|
for i,s in ipairs(test_soil) do
|
|
|
|
if minetest.registered_nodes[s] ~= nil then
|
|
|
|
table.insert(farming.change_soil_desert,s)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
farming.possible_biomes={}
|
|
|
|
for name,def in pairs(minetest.registered_biomes) do
|
|
|
|
if def.heat_point > 10 and def.heat_point < 50 and def.humidity_point > 5 and def.humidity_point < 70 then
|
|
|
|
table.insert(farming.possible_biomes,1,name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-10-08 05:55:32 -07:00
|
|
|
-- register for crops, which are spreading by abm
|
|
|
|
farming.spreading_crops = {}
|
2018-09-27 09:21:38 -07:00
|
|
|
|
2018-10-24 22:19:59 -07:00
|
|
|
farming.light_stat = farming.import_csv(farming.path.."/light_stat.txt",{
|
|
|
|
col_num={"day_start","amount","name"}})
|