mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2025-02-03 20:00:23 +01:00
chuck all worthless settings stuff, remove disabled code
This commit is contained in:
parent
5a8794cd84
commit
25fbc53114
@ -12,8 +12,6 @@
|
|||||||
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
|
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
assert(abstract_ferns.config.enable_lady_fern == true)
|
|
||||||
|
|
||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator("ferns")
|
local S = minetest.get_translator("ferns")
|
||||||
|
|
||||||
@ -86,8 +84,7 @@ end
|
|||||||
-- Spawning
|
-- Spawning
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||||
biome_lib.register_on_generate({ -- near trees (woodlands)
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -110,13 +107,11 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
|
|||||||
temp_max = -0.5, -- 55 °C (too hot?)
|
temp_max = -0.5, -- 55 °C (too hot?)
|
||||||
temp_min = 0.75, -- -12 °C
|
temp_min = 0.75, -- -12 °C
|
||||||
random_facedir = { 0, 179 },
|
random_facedir = { 0, 179 },
|
||||||
},
|
},
|
||||||
nodenames
|
nodenames
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||||
biome_lib.register_on_generate({ -- near stone (mountains)
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -137,13 +132,11 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
|
|||||||
temp_max = -0.5, -- 55 °C (too hot?)
|
temp_max = -0.5, -- 55 °C (too hot?)
|
||||||
temp_min = 0.75, -- -12 °C
|
temp_min = 0.75, -- -12 °C
|
||||||
random_facedir = { 0, 179 },
|
random_facedir = { 0, 179 },
|
||||||
},
|
},
|
||||||
nodenames
|
nodenames
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||||
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -177,39 +170,6 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
|
|||||||
temp_max = -0.5, -- 55 °C (too hot?)
|
temp_max = -0.5, -- 55 °C (too hot?)
|
||||||
temp_min = 0.75, -- -12 °C
|
temp_min = 0.75, -- -12 °C
|
||||||
random_facedir = { 0, 179 },
|
random_facedir = { 0, 179 },
|
||||||
},
|
},
|
||||||
nodenames
|
nodenames
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
|
||||||
biome_lib.register_on_generate({
|
|
||||||
surface = {
|
|
||||||
"default:dirt_with_grass",
|
|
||||||
"default:mossycobble",
|
|
||||||
"default:stone_with_coal",
|
|
||||||
"default:stone_with_iron",
|
|
||||||
"default:stone_with_tin", -- minetest >= 0.4.16
|
|
||||||
"moreores:mineral_tin",
|
|
||||||
"moreores:mineral_silver",
|
|
||||||
"sumpf:sumpf"
|
|
||||||
},
|
|
||||||
max_count = 70,
|
|
||||||
rarity = 25,--15,
|
|
||||||
min_elevation = 1, -- above sea level
|
|
||||||
near_nodes = {
|
|
||||||
"default:stone"
|
|
||||||
},
|
|
||||||
near_nodes_size = 2,
|
|
||||||
near_nodes_vertical = 2,--6,
|
|
||||||
near_nodes_count = 3,
|
|
||||||
plantlife_limit = -0.9,
|
|
||||||
humidity_max = -1.0,
|
|
||||||
humidity_min = 0.4,
|
|
||||||
temp_max = -0.5, -- 55 °C (too hot?)
|
|
||||||
temp_min = 0.75, -- -12 °C
|
|
||||||
random_facedir = { 0, 179 },
|
|
||||||
},
|
|
||||||
nodenames
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
-- Supports: vines
|
-- Supports: vines
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
assert(abstract_ferns.config.enable_giant_treefern == true)
|
|
||||||
|
|
||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator("ferns")
|
local S = minetest.get_translator("ferns")
|
||||||
-- lot of code, lot to load
|
-- lot of code, lot to load
|
||||||
@ -331,8 +329,7 @@ minetest.register_abm({
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
biome_lib.register_on_generate({
|
||||||
biome_lib.register_on_generate({
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||||
@ -351,14 +348,12 @@ if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
|||||||
near_nodes_vertical = 2,--4,
|
near_nodes_vertical = 2,--4,
|
||||||
near_nodes_count = 1,
|
near_nodes_count = 1,
|
||||||
plantlife_limit = -0.9,
|
plantlife_limit = -0.9,
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_giant_tree_fern
|
abstract_ferns.grow_giant_tree_fern
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
biome_lib.register_on_generate({
|
||||||
biome_lib.register_on_generate({
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
@ -378,7 +373,6 @@ if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
|||||||
humidity_min = 1.0,
|
humidity_min = 1.0,
|
||||||
temp_max = -1.0,
|
temp_max = -1.0,
|
||||||
temp_min = 1.0,
|
temp_min = 1.0,
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_giant_tree_fern
|
abstract_ferns.grow_giant_tree_fern
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
-- Supports: dryplants, stoneage, sumpf
|
-- Supports: dryplants, stoneage, sumpf
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
assert(abstract_ferns.config.enable_horsetails == true)
|
|
||||||
|
|
||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator("ferns")
|
local S = minetest.get_translator("ferns")
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
@ -71,52 +69,11 @@ end
|
|||||||
|
|
||||||
create_nodes()
|
create_nodes()
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
-- Spawning
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
|
||||||
minetest.register_abm({
|
|
||||||
nodenames = {
|
|
||||||
"default:dirt_with_grass",
|
|
||||||
"default:dirt_with_coniferous_litter",
|
|
||||||
"default:desert_sand",
|
|
||||||
"default:sand",
|
|
||||||
"dryplants:grass_short",
|
|
||||||
"stoneage:grass_with_silex",
|
|
||||||
"default:mossycobble",
|
|
||||||
"default:gravel"
|
|
||||||
},
|
|
||||||
interval = 1200,
|
|
||||||
chance = 400,
|
|
||||||
label = "[ferns] spawn horsetails",
|
|
||||||
min_y = 1,
|
|
||||||
max_y = 48,
|
|
||||||
action = function(pos, node)
|
|
||||||
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
|
||||||
local n_top = minetest.get_node_or_nil(p_top)
|
|
||||||
if not n_top or n_top.name ~= "air" then return end
|
|
||||||
|
|
||||||
local NEAR_DST = 2
|
|
||||||
if #minetest.find_nodes_in_area(
|
|
||||||
{x=pos.x-NEAR_DST, y=pos.y-1, z=pos.z-NEAR_DST},
|
|
||||||
{x=pos.x+NEAR_DST, y=pos.y+1, z=pos.z+NEAR_DST},
|
|
||||||
{"default:water_source","default:river_water_source","default:gravel"}
|
|
||||||
) < 1 then return
|
|
||||||
end
|
|
||||||
|
|
||||||
local plant_to_spawn = node_names[math.random(1, #node_names)]
|
|
||||||
|
|
||||||
minetest.swap_node(p_top, {name = plant_to_spawn, param2 = 0})
|
|
||||||
end
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- Generating
|
-- Generating
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
biome_lib.register_on_generate({
|
||||||
biome_lib.register_on_generate({
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||||
@ -143,13 +100,11 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
|||||||
temp_max = -0.5, -- 55 °C
|
temp_max = -0.5, -- 55 °C
|
||||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||||
--random_facedir = { 0, 179 },
|
--random_facedir = { 0, 179 },
|
||||||
},
|
},
|
||||||
node_names
|
node_names
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
|
||||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
biome_lib.register_on_generate({
|
||||||
biome_lib.register_on_generate({
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:gravel", -- roots go deep
|
"default:gravel", -- roots go deep
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -165,7 +120,6 @@ if abstract_ferns.config.enable_horsetails_on_stones == true then
|
|||||||
temp_max = -0.5, -- 55 °C
|
temp_max = -0.5, -- 55 °C
|
||||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||||
--random_facedir = { 0, 179 },
|
--random_facedir = { 0, 179 },
|
||||||
},
|
},
|
||||||
node_names
|
node_names
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
@ -1,21 +1,7 @@
|
|||||||
abstract_ferns = {}
|
abstract_ferns = {}
|
||||||
|
|
||||||
dofile(minetest.get_modpath("ferns").."/settings.lua")
|
dofile(minetest.get_modpath("ferns").."/fern.lua")
|
||||||
|
dofile(minetest.get_modpath("ferns").."/horsetail.lua")
|
||||||
if abstract_ferns.config.enable_lady_fern == true then
|
dofile(minetest.get_modpath("ferns").."/treefern.lua")
|
||||||
dofile(minetest.get_modpath("ferns").."/fern.lua")
|
dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
|
||||||
end
|
|
||||||
|
|
||||||
if abstract_ferns.config.enable_horsetails == true then
|
|
||||||
dofile(minetest.get_modpath("ferns").."/horsetail.lua")
|
|
||||||
end
|
|
||||||
|
|
||||||
if abstract_ferns.config.enable_treefern == true then
|
|
||||||
dofile(minetest.get_modpath("ferns").."/treefern.lua")
|
|
||||||
end
|
|
||||||
|
|
||||||
if abstract_ferns.config.enable_giant_treefern == true then
|
|
||||||
dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
|
|
||||||
end
|
|
||||||
|
|
||||||
dofile(minetest.get_modpath("ferns").."/crafting.lua")
|
dofile(minetest.get_modpath("ferns").."/crafting.lua")
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
name = ferns
|
name = ferns
|
||||||
depends = default, biome_lib
|
depends = default
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
-- In case you don't wanna have errors:
|
|
||||||
|
|
||||||
-- Only change what's behind a "=" (or "--").
|
|
||||||
-- Don't use caps (behind a "=").
|
|
||||||
|
|
||||||
-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around).
|
|
||||||
-- Spelling is important.
|
|
||||||
-- If "true" or "false" is necessary as setting, everything(!) which is not spelled "true" will be read as if it were "false" (even "1", "True"...)
|
|
||||||
|
|
||||||
-- If you wanna comment something (for example to remember the default value), you can do this by putting "--" in front of the comment.
|
|
||||||
-- You can put "--" at the end of a line with "=" in it, or at the beginning of an empty/new line (minetest will ignore what's behind it then).
|
|
||||||
-- But don't put "--" in front of a line with "=" in it (or else minetest will ignore the setting and you might get an error).
|
|
||||||
|
|
||||||
-- If something is still unclear, don't hesitate to post your question @ https://forum.minetest.net/viewtopic.php?id=6921
|
|
||||||
|
|
||||||
abstract_ferns.config = {}
|
|
||||||
|
|
||||||
-- Which plants should generate/spawn?
|
|
||||||
abstract_ferns.config.enable_lady_fern = true
|
|
||||||
abstract_ferns.config.enable_horsetails = true
|
|
||||||
abstract_ferns.config.enable_treefern = true
|
|
||||||
abstract_ferns.config.enable_giant_treefern = true
|
|
||||||
|
|
||||||
-- Where should they generate/spawn? (if they generate/spawn)
|
|
||||||
--
|
|
||||||
-- Lady-Fern
|
|
||||||
abstract_ferns.config.lady_ferns_near_tree = true
|
|
||||||
abstract_ferns.config.lady_ferns_near_rock = true
|
|
||||||
abstract_ferns.config.lady_ferns_near_ores = true -- if there's a bunch of ferns there's ores nearby, this one causes a huge fps drop
|
|
||||||
abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a replacement of Ferns_near_Ores: ferns tend to generate in groups, less fps drop, no hint for nearby ores
|
|
||||||
--
|
|
||||||
-- Horsetails
|
|
||||||
abstract_ferns.config.enable_horsetails_spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
|
|
||||||
abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
|
|
||||||
abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
|
|
||||||
--
|
|
||||||
-- Tree_Fern
|
|
||||||
abstract_ferns.config.enable_treeferns_in_jungle = true
|
|
||||||
abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
|
|
||||||
--
|
|
||||||
-- Giant_Tree_Fern
|
|
||||||
abstract_ferns.config.enable_giant_treeferns_in_jungle = true
|
|
||||||
abstract_ferns.config.enable_giant_treeferns_in_oases = true -- for oases and tropical beaches
|
|
@ -9,8 +9,6 @@
|
|||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator("ferns")
|
local S = minetest.get_translator("ferns")
|
||||||
|
|
||||||
assert(abstract_ferns.config.enable_treefern == true)
|
|
||||||
|
|
||||||
function abstract_ferns.can_grow_tree_fern(pos)
|
function abstract_ferns.can_grow_tree_fern(pos)
|
||||||
local node_name = minetest.get_node(pos).name
|
local node_name = minetest.get_node(pos).name
|
||||||
if node_name ~= "air" and node_name ~= "ferns:sapling_tree_fern" and node_name ~= "default:junglegrass" then
|
if node_name ~= "air" and node_name ~= "ferns:sapling_tree_fern" and node_name ~= "default:junglegrass" then
|
||||||
@ -205,8 +203,7 @@ minetest.register_abm({
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
biome_lib.register_on_generate({
|
||||||
biome_lib.register_on_generate({
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||||
@ -228,14 +225,12 @@ if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
|||||||
humidity_min = 0.4,
|
humidity_min = 0.4,
|
||||||
temp_max = -0.5,
|
temp_max = -0.5,
|
||||||
temp_min = 0.13,
|
temp_min = 0.13,
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_tree_fern
|
abstract_ferns.grow_tree_fern
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
biome_lib.register_on_generate({
|
||||||
biome_lib.register_on_generate({
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
@ -255,7 +250,6 @@ if abstract_ferns.config.enable_treeferns_in_oases == true then
|
|||||||
humidity_min = 1.0,
|
humidity_min = 1.0,
|
||||||
temp_max = -1.0,
|
temp_max = -1.0,
|
||||||
temp_min = 1.0,
|
temp_min = 1.0,
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_tree_fern
|
abstract_ferns.grow_tree_fern
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
Loading…
Reference in New Issue
Block a user