mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2025-02-09 14:40:23 +01:00
Merge branch 'Zeno' of https://github.com/Zeno-/plantlife_modpack into ferns-cleanup
This commit is contained in:
commit
d1369c25cf
@ -1,42 +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
|
|
||||||
|
|
||||||
|
|
||||||
-- Which plants should generate/spawn?
|
|
||||||
Lady_fern = true
|
|
||||||
Horsetails = true
|
|
||||||
Tree_Fern = true
|
|
||||||
Giant_Tree_Fern = true
|
|
||||||
|
|
||||||
-- Where should they generate/spawn? (if they generate/spawn)
|
|
||||||
--
|
|
||||||
-- Lady-Fern
|
|
||||||
Ferns_near_Tree = true
|
|
||||||
Ferns_near_Rock = true
|
|
||||||
Ferns_near_Ores = true -- if there's a bunch of ferns there's ores nearby, this one causes a huge fps drop
|
|
||||||
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
|
|
||||||
Horsetails_Spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
|
|
||||||
Horsetails_on_Grass = true -- on dirt with grass and swamp (sumpf mod)
|
|
||||||
Horsetails_on_Stony = true -- on gravel, mossy cobble and silex (stoneage mod)
|
|
||||||
--
|
|
||||||
-- Tree_Fern
|
|
||||||
Tree_Ferns_in_Jungle = true
|
|
||||||
Tree_Ferns_for_Oases = true -- for oases and tropical beaches
|
|
||||||
--
|
|
||||||
-- Giant_Tree_Fern
|
|
||||||
Giant_Tree_Ferns_in_Jungle = true
|
|
||||||
Giant_Tree_Ferns_for_Oases = true -- for oases and tropical beaches
|
|
@ -101,34 +101,11 @@ minetest.register_node("ferns:fern_01", {
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- Spawning
|
-- Spawning
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
--[[plantslib:spawn_on_surfaces({
|
|
||||||
spawn_delay = 1200,
|
assert(abstract_ferns.config.Lady_fern == true)
|
||||||
spawn_plants = {"ferns:fern"},
|
|
||||||
spawn_chance = 800,
|
if abstract_ferns.config.Ferns_near_Tree == true then
|
||||||
spawn_surfaces = {
|
plantslib:register_generate_plant({ -- near trees (woodlands)
|
||||||
"default:dirt_with_grass",
|
|
||||||
"default:mossycobble",
|
|
||||||
"dryplants:grass_short",
|
|
||||||
"default:jungletree",
|
|
||||||
"stoneage:grass_with_silex"
|
|
||||||
},
|
|
||||||
seed_diff = 329,
|
|
||||||
})
|
|
||||||
plantslib:spawn_on_surfaces({
|
|
||||||
spawn_delay = 1200,
|
|
||||||
spawn_plants = {"ferns:fern_mid"},
|
|
||||||
spawn_chance = 400,
|
|
||||||
spawn_surfaces = {
|
|
||||||
"default:dirt_with_grass",
|
|
||||||
"default:mossycobble",
|
|
||||||
"dryplants:grass_short",
|
|
||||||
"default:jungletree",
|
|
||||||
"stoneage:grass_with_silex"
|
|
||||||
},
|
|
||||||
seed_diff = 329,
|
|
||||||
})]]
|
|
||||||
if Ferns_near_Tree == true then
|
|
||||||
plantslib:register_generate_plant({ -- near trees (woodlands)
|
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -152,11 +129,11 @@ plantslib:register_generate_plant({ -- near trees (woodlands)
|
|||||||
temp_min = 0.75, -- -12 °C
|
temp_min = 0.75, -- -12 °C
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_fern
|
abstract_ferns.grow_fern
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Ferns_near_Rock == true then
|
if abstract_ferns.config.Ferns_near_Rock == true then
|
||||||
plantslib:register_generate_plant({ -- near stone (mountains)
|
plantslib:register_generate_plant({ -- near stone (mountains)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -178,11 +155,11 @@ plantslib:register_generate_plant({ -- near stone (mountains)
|
|||||||
temp_min = 0.75, -- -12 °C
|
temp_min = 0.75, -- -12 °C
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_fern
|
abstract_ferns.grow_fern
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Ferns_near_Ores == true then -- this one causes a huge fps drop
|
if abstract_ferns.config.Ferns_near_Ores == true then -- this one causes a huge fps drop
|
||||||
plantslib:register_generate_plant({ -- near ores (potential mining sites)
|
plantslib:register_generate_plant({ -- near ores (potential mining sites)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -215,11 +192,11 @@ plantslib:register_generate_plant({ -- near ores (potential mining sites)
|
|||||||
temp_min = 0.75, -- -12 °C
|
temp_min = 0.75, -- -12 °C
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_fern
|
abstract_ferns.grow_fern
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Ferns_in_Groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
if abstract_ferns.config.Ferns_in_Groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||||
plantslib:register_generate_plant({
|
plantslib:register_generate_plant({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -245,5 +222,5 @@ plantslib:register_generate_plant({
|
|||||||
temp_min = 0.75, -- -12 °C
|
temp_min = 0.75, -- -12 °C
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_fern
|
abstract_ferns.grow_fern
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -11,32 +11,53 @@
|
|||||||
-- lot of code, lot to load
|
-- lot of code, lot to load
|
||||||
|
|
||||||
abstract_ferns.grow_giant_tree_fern = function(pos)
|
abstract_ferns.grow_giant_tree_fern = function(pos)
|
||||||
local size = math.random(12,16) -- min of range must be >= 4
|
|
||||||
local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
|
local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||||
|
if minetest.get_node(pos_01).name ~= "air"
|
||||||
|
and minetest.get_node(pos_01).name ~= "ferns:sapling_giant_tree_fern"
|
||||||
|
and minetest.get_node(pos_01).name ~= "default:junglegrass" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local leave_a_1 = {x = pos.x + 1, y = pos.y + size - 1, z = pos.z }
|
local size = math.random(12,16) -- min of range must be >= 4
|
||||||
local leave_a_2 = {x = pos.x + 2, y = pos.y + size , z = pos.z }
|
|
||||||
local leave_a_3 = {x = pos.x + 3, y = pos.y + size - 1, z = pos.z }
|
|
||||||
local leave_a_4 = {x = pos.x + 4, y = pos.y + size - 2, z = pos.z }
|
|
||||||
|
|
||||||
local leave_b_1 = {x = pos.x - 1, y = pos.y + size - 1, z = pos.z }
|
local leafchecks = {
|
||||||
local leave_b_2 = {x = pos.x - 2, y = pos.y + size, z = pos.z }
|
{
|
||||||
local leave_b_3 = {x = pos.x - 3, y = pos.y + size - 1, z = pos.z }
|
direction = 3,
|
||||||
local leave_b_4 = {x = pos.x - 4, y = pos.y + size - 2, z = pos.z }
|
positions = {
|
||||||
|
{x = pos.x + 1, y = pos.y + size - 1, z = pos.z },
|
||||||
local leave_c_1 = {x = pos.x , y = pos.y + size - 1, z = pos.z + 1}
|
{x = pos.x + 2, y = pos.y + size , z = pos.z },
|
||||||
local leave_c_2 = {x = pos.x , y = pos.y + size , z = pos.z + 2}
|
{x = pos.x + 3, y = pos.y + size - 1, z = pos.z },
|
||||||
local leave_c_3 = {x = pos.x , y = pos.y + size - 1, z = pos.z + 3}
|
{x = pos.x + 4, y = pos.y + size - 2, z = pos.z }
|
||||||
local leave_c_4 = {x = pos.x , y = pos.y + size - 2, z = pos.z + 4}
|
}
|
||||||
|
},
|
||||||
local leave_d_1 = {x = pos.x , y = pos.y + size - 1, z = pos.z - 1}
|
{
|
||||||
local leave_d_2 = {x = pos.x , y = pos.y + size , z = pos.z - 2}
|
direction = 1,
|
||||||
local leave_d_3 = {x = pos.x , y = pos.y + size - 1, z = pos.z - 3}
|
positions = {
|
||||||
local leave_d_4 = {x = pos.x , y = pos.y + size - 2, z = pos.z - 4}
|
{x = pos.x - 1, y = pos.y + size - 1, z = pos.z },
|
||||||
|
{x = pos.x - 2, y = pos.y + size, z = pos.z },
|
||||||
if minetest.get_node(pos_01).name == "air" -- instead of check_air = true,
|
{x = pos.x - 3, y = pos.y + size - 1, z = pos.z },
|
||||||
or minetest.get_node(pos_01).name == "ferns:sapling_giant_tree_fern"
|
{x = pos.x - 4, y = pos.y + size - 2, z = pos.z }
|
||||||
or minetest.get_node(pos_01).name == "default:junglegrass" then
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
direction = 2,
|
||||||
|
positions = {
|
||||||
|
{x = pos.x , y = pos.y + size - 1, z = pos.z + 1},
|
||||||
|
{x = pos.x , y = pos.y + size , z = pos.z + 2},
|
||||||
|
{x = pos.x , y = pos.y + size - 1, z = pos.z + 3},
|
||||||
|
{x = pos.x , y = pos.y + size - 2, z = pos.z + 4}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
direction = 0,
|
||||||
|
positions = {
|
||||||
|
{x = pos.x , y = pos.y + size - 1, z = pos.z - 1},
|
||||||
|
{x = pos.x , y = pos.y + size , z = pos.z - 2},
|
||||||
|
{x = pos.x , y = pos.y + size - 1, z = pos.z - 3},
|
||||||
|
{x = pos.x , y = pos.y + size - 2, z = pos.z - 4}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for i = 1, size-3 do
|
for i = 1, size-3 do
|
||||||
minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, {name="ferns:fern_trunk_big"})
|
minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, {name="ferns:fern_trunk_big"})
|
||||||
@ -46,80 +67,26 @@ abstract_ferns.grow_giant_tree_fern = function(pos)
|
|||||||
|
|
||||||
-- all the checking for air below is to prevent some ugly bugs (incomplete trunks of neighbouring trees), it's a bit slower, but worth the result
|
-- all the checking for air below is to prevent some ugly bugs (incomplete trunks of neighbouring trees), it's a bit slower, but worth the result
|
||||||
|
|
||||||
if minetest.get_node(leave_a_1).name == "air" then
|
-- assert(#leafchecks == 4)
|
||||||
minetest.set_node(leave_a_1, {name="ferns:tree_fern_leave_big"})
|
for i = 1, 4 do
|
||||||
if minetest.get_node(leave_a_2).name == "air" then
|
local positions = leafchecks[i].positions
|
||||||
minetest.set_node(leave_a_2, {name="ferns:tree_fern_leave_big"})
|
local rot = leafchecks[i].direction
|
||||||
if minetest.get_node(leave_a_3).name == "air" then
|
local endpos = 4 -- If the loop below adds all intermediate leaves then the "terminating" leaf will be at positions[4]
|
||||||
minetest.set_node(leave_a_3, {name="ferns:tree_fern_leave_big"})
|
-- assert(#positions == 4)
|
||||||
if minetest.get_node(leave_a_4).name == "air" then
|
-- add leaves so long as the destination nodes are air
|
||||||
minetest.set_node(leave_a_4, {name="ferns:tree_fern_leave_big_end", param2=3})
|
for j = 1, 3 do
|
||||||
|
if minetest.get_node(positions[j]).name == "air" then
|
||||||
|
minetest.set_node(positions[j], {name="ferns:tree_fern_leave_big"})
|
||||||
|
else
|
||||||
|
endpos = j
|
||||||
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- add the terminating leaf if required and possible
|
||||||
|
if endpos == 4 and minetest.get_node(positions[endpos]).name == "air" then
|
||||||
|
minetest.set_node(positions[endpos], {name="ferns:tree_fern_leave_big_end", param2=rot})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.get_node(leave_b_1).name == "air" then
|
|
||||||
minetest.set_node(leave_b_1, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_b_2).name == "air" then
|
|
||||||
minetest.set_node(leave_b_2, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_b_3).name == "air" then
|
|
||||||
minetest.set_node(leave_b_3, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_b_4).name == "air" then
|
|
||||||
minetest.set_node(leave_b_4, {name="ferns:tree_fern_leave_big_end", param2=1})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_node(leave_c_1).name == "air" then
|
|
||||||
minetest.set_node(leave_c_1, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_c_2).name == "air" then
|
|
||||||
minetest.set_node(leave_c_2, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_c_3).name == "air" then
|
|
||||||
minetest.set_node(leave_c_3, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_c_4).name == "air" then
|
|
||||||
minetest.set_node(leave_c_4, {name="ferns:tree_fern_leave_big_end", param2=2})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_node(leave_d_1).name == "air" then
|
|
||||||
minetest.set_node(leave_d_1, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_d_2).name == "air" then
|
|
||||||
minetest.set_node(leave_d_2, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_d_3).name == "air" then
|
|
||||||
minetest.set_node(leave_d_3, {name="ferns:tree_fern_leave_big"})
|
|
||||||
if minetest.get_node(leave_d_4).name == "air" then
|
|
||||||
minetest.set_node(leave_d_4, {name="ferns:tree_fern_leave_big_end", param2=0})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- bug fixes # 2 - doesn't really work, so disabled for now
|
|
||||||
--[[if minetest.get_node(leave_a_4).name == "ferns:tree_fern_leave_big_end"
|
|
||||||
and minetest.get_node(leave_a_3).name == "ferns:fern_trunk_big" then
|
|
||||||
minetest.set_node(leave_a_4, {name="air"})
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_node(leave_b_4).name == "ferns:tree_fern_leave_big_end"
|
|
||||||
and minetest.get_node(leave_b_3).name == "ferns:fern_trunk_big" then
|
|
||||||
minetest.set_node(leave_b_4, {name="air"})
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_node(leave_c_4).name == "ferns:tree_fern_leave_big_end"
|
|
||||||
and minetest.get_node(leave_c_3).name == "ferns:fern_trunk_big" then
|
|
||||||
minetest.set_node(leave_c_4, {name="air"})
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_node(leave_d_4).name == "ferns:tree_fern_leave_big_end"
|
|
||||||
and minetest.get_node(leave_d_3).name == "ferns:fern_trunk_big" then
|
|
||||||
minetest.set_node(leave_d_4, {name="air"})
|
|
||||||
end]]
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
@ -131,8 +98,6 @@ minetest.register_node("ferns:tree_fern_leaves_giant", {
|
|||||||
visual_scale = math.sqrt(8),
|
visual_scale = math.sqrt(8),
|
||||||
wield_scale = {x=0.175, y=0.175, z=0.175},
|
wield_scale = {x=0.175, y=0.175, z=0.175},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
--paramtype2 = "facedir",
|
|
||||||
--tiles = {"[combine:"..TSS..T1.."ferns_5.png"..T2.."ferns_6.png"..T3.."ferns_7.png"..T4.."ferns_8.png^[transformFX^[combine:"..TSS..T1.."ferns_5.png"..T2.."ferns_6.png"..T3.."ferns_7.png"..T4.."ferns_8.png"},
|
|
||||||
tiles = {"ferns_fern_tree_giant.png"},
|
tiles = {"ferns_fern_tree_giant.png"},
|
||||||
inventory_image = "ferns_fern_tree.png",
|
inventory_image = "ferns_fern_tree.png",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
@ -309,9 +274,12 @@ minetest.register_abm({
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- GENERATE GIANT TREE FERN
|
-- GENERATE GIANT TREE FERN
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
assert(abstract_ferns.config.Giant_Tree_Fern == true)
|
||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if Giant_Tree_Ferns_in_Jungle == true then
|
if abstract_ferns.config.Giant_Tree_Ferns_in_Jungle == true then
|
||||||
plantslib:register_generate_plant({
|
plantslib:register_generate_plant({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:sand",
|
"default:sand",
|
||||||
@ -329,18 +297,14 @@ plantslib:register_generate_plant({
|
|||||||
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,
|
||||||
--humidity_max = 0.39,--1.0,
|
|
||||||
--humidity_min = 0.5,
|
|
||||||
--temp_max = -1,-- -1.2,-- -0.5, -- ~ 55C
|
|
||||||
--temp_min = -0.35,-- -0.07, -- ~ 25C
|
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_giant_tree_fern
|
abstract_ferns.grow_giant_tree_fern
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if Giant_Tree_Ferns_for_Oases == true then
|
if abstract_ferns.config.Giant_Tree_Ferns_for_Oases == true then
|
||||||
plantslib:register_generate_plant({
|
plantslib:register_generate_plant({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
@ -362,5 +326,5 @@ plantslib:register_generate_plant({
|
|||||||
temp_min = 1.0,
|
temp_min = 1.0,
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_giant_tree_fern
|
abstract_ferns.grow_giant_tree_fern
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -94,8 +94,8 @@ minetest.register_node("ferns:horsetail_04", { -- the one in inventory
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- Spawning
|
-- Spawning
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
if Horsetails_Spawning == true then
|
if abstract_ferns.config.Horsetails_Spawning == true then
|
||||||
plantslib:spawn_on_surfaces({
|
plantslib:spawn_on_surfaces({
|
||||||
spawn_delay = 1200,
|
spawn_delay = 1200,
|
||||||
spawn_plants = {
|
spawn_plants = {
|
||||||
"ferns:horsetail_01",
|
"ferns:horsetail_01",
|
||||||
@ -119,13 +119,16 @@ plantslib:spawn_on_surfaces({
|
|||||||
near_nodes_size = 2,
|
near_nodes_size = 2,
|
||||||
near_nodes_vertical = 1,
|
near_nodes_vertical = 1,
|
||||||
near_nodes_count = 1,
|
near_nodes_count = 1,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- Generating
|
-- Generating
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
if Horsetails_on_Grass == true then
|
|
||||||
plantslib:register_generate_plant({
|
assert(abstract_ferns.config.Horsetails == true)
|
||||||
|
|
||||||
|
if abstract_ferns.config.Horsetails_on_Grass == true then
|
||||||
|
plantslib:register_generate_plant({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
@ -152,11 +155,11 @@ plantslib:register_generate_plant({
|
|||||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_horsetail
|
abstract_ferns.grow_horsetail
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Horsetails_on_Stony == true then
|
if abstract_ferns.config.Horsetails_on_Stony == true then
|
||||||
plantslib:register_generate_plant({
|
plantslib:register_generate_plant({
|
||||||
surface = {
|
surface = {
|
||||||
"default:gravel", -- roots go deep
|
"default:gravel", -- roots go deep
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -174,5 +177,5 @@ plantslib:register_generate_plant({
|
|||||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_horsetail
|
abstract_ferns.grow_horsetail
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
local title = "Ferns" -- former "Archae Plantae"
|
local title = "Ferns" -- former "Archae Plantae"
|
||||||
local version = "0.1.2"
|
local version = "0.2.0"
|
||||||
local mname = "ferns" -- former "archaeplantae"
|
local mname = "ferns" -- former "archaeplantae"
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- (by Mossmanikin)
|
-- (by Mossmanikin)
|
||||||
@ -8,21 +8,21 @@ local mname = "ferns" -- former "archaeplantae"
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
abstract_ferns = {}
|
abstract_ferns = {}
|
||||||
|
|
||||||
dofile(minetest.get_modpath("ferns").."/SeTTiNGS.txt")
|
dofile(minetest.get_modpath("ferns").."/settings.lua")
|
||||||
|
|
||||||
if Lady_fern == true then
|
if abstract_ferns.config.Lady_fern == true then
|
||||||
dofile(minetest.get_modpath("ferns").."/fern.lua")
|
dofile(minetest.get_modpath("ferns").."/fern.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
if Horsetails == true then
|
if abstract_ferns.config.Horsetails == true then
|
||||||
dofile(minetest.get_modpath("ferns").."/horsetail.lua")
|
dofile(minetest.get_modpath("ferns").."/horsetail.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
if Tree_Fern == true then
|
if abstract_ferns.config.Tree_Fern == true then
|
||||||
dofile(minetest.get_modpath("ferns").."/treefern.lua")
|
dofile(minetest.get_modpath("ferns").."/treefern.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
if Giant_Tree_Fern == true then
|
if abstract_ferns.config.Giant_Tree_Fern == true then
|
||||||
dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
|
dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
43
ferns/settings.lua
Normal file
43
ferns/settings.lua
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
-- 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.Lady_fern = true
|
||||||
|
abstract_ferns.config.Horsetails = true
|
||||||
|
abstract_ferns.config.Tree_Fern = true
|
||||||
|
abstract_ferns.config.Giant_Tree_Fern = true
|
||||||
|
|
||||||
|
-- Where should they generate/spawn? (if they generate/spawn)
|
||||||
|
--
|
||||||
|
-- Lady-Fern
|
||||||
|
abstract_ferns.config.Ferns_near_Tree = true
|
||||||
|
abstract_ferns.config.Ferns_near_Rock = true
|
||||||
|
abstract_ferns.config.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.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.Horsetails_Spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
|
||||||
|
abstract_ferns.config.Horsetails_on_Grass = true -- on dirt with grass and swamp (sumpf mod)
|
||||||
|
abstract_ferns.config.Horsetails_on_Stony = true -- on gravel, mossy cobble and silex (stoneage mod)
|
||||||
|
--
|
||||||
|
-- Tree_Fern
|
||||||
|
abstract_ferns.config.Tree_Ferns_in_Jungle = true
|
||||||
|
abstract_ferns.config.Tree_Ferns_for_Oases = true -- for oases and tropical beaches
|
||||||
|
--
|
||||||
|
-- Giant_Tree_Fern
|
||||||
|
abstract_ferns.config.Giant_Tree_Ferns_in_Jungle = true
|
||||||
|
abstract_ferns.config.Giant_Tree_Ferns_for_Oases = true -- for oases and tropical beaches
|
@ -188,14 +188,16 @@ minetest.register_abm({
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- GENERATE TREE FERN
|
-- GENERATE TREE FERN
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
assert(abstract_ferns.config.Tree_Fern == true)
|
||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if Tree_Ferns_in_Jungle == true then
|
if abstract_ferns.config.Tree_Ferns_in_Jungle == true then
|
||||||
plantslib:register_generate_plant({
|
plantslib:register_generate_plant({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:sand",
|
"default:sand",
|
||||||
"default:desert_sand"--,
|
"default:desert_sand",
|
||||||
--"dryplants:grass_short"
|
|
||||||
},
|
},
|
||||||
max_count = 35,--27,
|
max_count = 35,--27,
|
||||||
avoid_nodes = {"default:tree"},
|
avoid_nodes = {"default:tree"},
|
||||||
@ -214,12 +216,12 @@ plantslib:register_generate_plant({
|
|||||||
temp_min = 0.13,
|
temp_min = 0.13,
|
||||||
},
|
},
|
||||||
abstract_ferns.grow_tree_fern
|
abstract_ferns.grow_tree_fern
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if Tree_Ferns_for_Oases == true then
|
if abstract_ferns.config.Tree_Ferns_for_Oases == true then
|
||||||
plantslib:register_generate_plant({
|
plantslib:register_generate_plant({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
|
Loading…
Reference in New Issue
Block a user