summaryrefslogtreecommitdiff
path: root/ferns
diff options
context:
space:
mode:
Diffstat (limited to 'ferns')
-rw-r--r--ferns/crafting.lua215
-rw-r--r--ferns/fern.lua415
-rw-r--r--ferns/gianttreefern.lua7
-rw-r--r--ferns/horsetail.lua10
-rw-r--r--ferns/init.lua4
-rw-r--r--ferns/settings.lua8
-rw-r--r--ferns/treefern.lua13
7 files changed, 346 insertions, 326 deletions
diff --git a/ferns/crafting.lua b/ferns/crafting.lua
index 7a74579..1a24429 100644
--- a/ferns/crafting.lua
+++ b/ferns/crafting.lua
@@ -1,105 +1,110 @@
--- support for i18n
-local S = plantlife_i18n.gettext
------------------------------------------------------------------------------------------------
--- Ferns - Crafting 0.0.5
------------------------------------------------------------------------------------------------
--- (by Mossmanikin)
--- License (everything): WTFPL
------------------------------------------------------------------------------------------------
-minetest.register_craft({
- type = "shapeless",
- output = "ferns:fiddlehead 3",
- recipe = {"ferns:fern_01"},
- replacements = {
- {"ferns:fern_01", "ferns:ferntuber"}
- },
-})
-
-minetest.register_craft({
- type = "shapeless",
- output = "ferns:fiddlehead 3",
- recipe = {"ferns:tree_fern_leaves"},
- replacements = {
- {"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
- },
-})
------------------------------------------------------------------------------------------------
--- FIDDLEHEAD
------------------------------------------------------------------------------------------------
-minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
-
-minetest.register_craftitem("ferns:fiddlehead", {
- description = S("Fiddlehead"),
- inventory_image = "ferns_fiddlehead.png",
- on_use = minetest.item_eat(-1), -- slightly poisonous when raw
-})
-minetest.register_craft({
- type = "cooking",
- output = "ferns:fiddlehead_roasted",
- recipe = "ferns:fiddlehead",
- cooktime = 1,
-})
-minetest.register_craftitem("ferns:fiddlehead_roasted", {
- description = S("Roasted Fiddlehead"),
- inventory_image = "ferns_fiddlehead_roasted.png",
- on_use = minetest.item_eat(1), -- edible when cooked
-})
------------------------------------------------------------------------------------------------
--- FERN TUBER
------------------------------------------------------------------------------------------------
-minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
-
-minetest.register_craftitem("ferns:ferntuber", {
- description = S("Fern Tuber"),
- inventory_image = "ferns_ferntuber.png",
-})
-minetest.register_craft({
- type = "cooking",
- output = "ferns:ferntuber_roasted",
- recipe = "ferns:ferntuber",
- cooktime = 3,
-})
-
-minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
-
-minetest.register_craftitem("ferns:ferntuber_roasted", {
- description = S("Roasted Fern Tuber"),
- inventory_image = "ferns_ferntuber_roasted.png",
- on_use = minetest.item_eat(3),
-})
------------------------------------------------------------------------------------------------
--- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
------------------------------------------------------------------------------------------------
-minetest.register_craft({
- type = "shapeless",
- output = "dye:green",
- recipe = {"group:horsetail"},
-})
------------------------------------------------------------------------------------------------
--- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
------------------------------------------------------------------------------------------------
---[[minetest.register_craft({
- type = "shapeless",
- output = "default:pick_wood",
- recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
-})
-minetest.register_craft({
- type = "shapeless",
- output = "default:shovel_wood",
- recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
-})
-minetest.register_craft({
- type = "shapeless",
- output = "default:axe_wood",
- recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
-})
-minetest.register_craft({
- type = "shapeless",
- output = "default:sword_wood",
- recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
-})
-minetest.register_craft({
- type = "shapeless",
- output = "farming:hoe_wood",
- recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
-})]]
+-- support for i18n
+local S = plantlife_i18n.gettext
+-----------------------------------------------------------------------------------------------
+-- Ferns - Crafting 0.0.5
+-----------------------------------------------------------------------------------------------
+-- (by Mossmanikin)
+-- License (everything): WTFPL
+-----------------------------------------------------------------------------------------------
+
+local fern1 = minetest.registered_items["default:fern_1"] or false
+fern1 = (fern1 and fern1.name) or "ferns:fern_01"
+
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "ferns:fiddlehead 3",
+ recipe = {"ferns:fern_01"},
+ replacements = {
+ {fern1, "ferns:ferntuber"}
+ },
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "ferns:fiddlehead 3",
+ recipe = {"ferns:tree_fern_leaves"},
+ replacements = {
+ {"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
+ },
+})
+-----------------------------------------------------------------------------------------------
+-- FIDDLEHEAD
+-----------------------------------------------------------------------------------------------
+minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
+
+minetest.register_craftitem("ferns:fiddlehead", {
+ description = S("Fiddlehead"),
+ inventory_image = "ferns_fiddlehead.png",
+ on_use = minetest.item_eat(-1), -- slightly poisonous when raw
+})
+minetest.register_craft({
+ type = "cooking",
+ output = "ferns:fiddlehead_roasted",
+ recipe = "ferns:fiddlehead",
+ cooktime = 1,
+})
+minetest.register_craftitem("ferns:fiddlehead_roasted", {
+ description = S("Roasted Fiddlehead"),
+ inventory_image = "ferns_fiddlehead_roasted.png",
+ on_use = minetest.item_eat(1), -- edible when cooked
+})
+-----------------------------------------------------------------------------------------------
+-- FERN TUBER
+-----------------------------------------------------------------------------------------------
+minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
+
+minetest.register_craftitem("ferns:ferntuber", {
+ description = S("Fern Tuber"),
+ inventory_image = "ferns_ferntuber.png",
+})
+minetest.register_craft({
+ type = "cooking",
+ output = "ferns:ferntuber_roasted",
+ recipe = "ferns:ferntuber",
+ cooktime = 3,
+})
+
+minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
+
+minetest.register_craftitem("ferns:ferntuber_roasted", {
+ description = S("Roasted Fern Tuber"),
+ inventory_image = "ferns_ferntuber_roasted.png",
+ on_use = minetest.item_eat(3),
+})
+-----------------------------------------------------------------------------------------------
+-- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({
+ type = "shapeless",
+ output = "dye:green",
+ recipe = {"group:horsetail"},
+})
+-----------------------------------------------------------------------------------------------
+-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
+-----------------------------------------------------------------------------------------------
+--[[minetest.register_craft({
+ type = "shapeless",
+ output = "default:pick_wood",
+ recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:shovel_wood",
+ recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:axe_wood",
+ recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:sword_wood",
+ recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "farming:hoe_wood",
+ recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
+})]]
diff --git a/ferns/fern.lua b/ferns/fern.lua
index ed0bd71..5c03131 100644
--- a/ferns/fern.lua
+++ b/ferns/fern.lua
@@ -1,199 +1,216 @@
------------------------------------------------------------------------------------------------
--- Ferns - Fern 0.1.0
------------------------------------------------------------------------------------------------
--- by Mossmanikin
--- License (everything): WTFPL
--- Contains code from: biome_lib
--- Looked at code from: default, flowers, painting, trees
--- Dependencies: biome_lib
--- Supports: dryplants, stoneage, sumpf
------------------------------------------------------------------------------------------------
--- some inspiration from here
--- https://en.wikipedia.org/wiki/Athyrium_yokoscense
--- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
------------------------------------------------------------------------------------------------
-
-assert(abstract_ferns.config.enable_lady_fern == true)
-
--- support for i18n
-local S = plantlife_i18n.gettext
-
--- Maintain backward compatibilty
-minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
-minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
-minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
-minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
-
-local nodenames = {}
-
-local function create_nodes()
- local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
- local vscales = { 1, math.sqrt(8), math.sqrt(11) }
- local descs = { S("Lady-fern (Athyrium)"), nil, nil }
-
- for i = 1, 3 do
- local node_on_place = nil
- if i == 1 then
- node_on_place = function(itemstack, placer, pointed_thing)
- -- place a random fern
- local stack = ItemStack("ferns:fern_0"..math.random(1,4))
- local ret = minetest.item_place(stack, placer, pointed_thing)
- return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
- end
- end
- nodenames[i] = "ferns:fern_"..string.format("%02d", i)
- minetest.register_node(nodenames[i], {
- description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
- inventory_image = "ferns_fern.png",
- drawtype = "plantlike",
- visual_scale = vscales[i],
- paramtype = "light",
- tiles = { images[i] },
- walkable = false,
- buildable_to = true,
- groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
- },
- drop = "ferns:fern_01",
- on_place = node_on_place
- })
- end
-end
-
------------------------------------------------------------------------------------------------
--- Init
------------------------------------------------------------------------------------------------
-
-create_nodes()
-
------------------------------------------------------------------------------------------------
--- Spawning
------------------------------------------------------------------------------------------------
-
-if abstract_ferns.config.lady_ferns_near_tree == true then
- biome_lib:register_generate_plant({ -- near trees (woodlands)
- surface = {
- "default:dirt_with_grass",
- "default:mossycobble",
- "default:desert_sand",
- "default:sand",
- "default:jungletree",
- "stoneage:grass_with_silex",
- "sumpf:sumpf"
- },
- max_count = 30,
- rarity = 62,--63,
- min_elevation = 1, -- above sea level
- near_nodes = {"group:tree"},
- near_nodes_size = 3,--4,
- near_nodes_vertical = 2,--3,
- near_nodes_count = 1,
- 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
-
-if abstract_ferns.config.lady_ferns_near_rock == true then
- biome_lib:register_generate_plant({ -- near stone (mountains)
- surface = {
- "default:dirt_with_grass",
- "default:mossycobble",
- "group:falling_node",
- --"default:jungletree",
- "stoneage:grass_with_silex",
- "sumpf:sumpf"
- },
- max_count = 35,
- rarity = 40,
- min_elevation = 1, -- above sea level
- near_nodes = {"group:stone"},
- near_nodes_size = 1,
- near_nodes_count = 16,
- 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
-
-if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
- biome_lib:register_generate_plant({ -- near ores (potential mining sites)
- surface = {
- "default:dirt_with_grass",
- "default:mossycobble",
- "default:stone_with_coal",
- "default:stone_with_iron",
- "moreores:mineral_tin",
- "moreores:mineral_silver",
- "sumpf:sumpf"
- },
- max_count = 1200,--1600, -- maybe too much? :D
- rarity = 25,--15,
- min_elevation = 1, -- above sea level
- near_nodes = {
- "default:stone_with_iron",
- --"default:stone_with_copper",
- --"default:stone_with_mese",
- --"default:stone_with_gold",
- --"default:stone_with_diamond",
- "moreores:mineral_tin",
- "moreores:mineral_silver"
- --"moreores:mineral_mithril"
- },
- near_nodes_size = 2,
- near_nodes_vertical = 4,--5,--6,
- near_nodes_count = 2,--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
-
-if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
- biome_lib:register_generate_plant({
- surface = {
- "default:dirt_with_grass",
- "default:mossycobble",
- "default:stone_with_coal",
- "default:stone_with_iron",
- "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
+-----------------------------------------------------------------------------------------------
+-- Ferns - Fern 0.1.0
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
+-- Looked at code from: default, flowers, painting, trees
+-- Dependencies: biome_lib
+-- Supports: dryplants, stoneage, sumpf
+-----------------------------------------------------------------------------------------------
+-- some inspiration from here
+-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
+-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
+-----------------------------------------------------------------------------------------------
+
+assert(abstract_ferns.config.enable_lady_fern == true)
+
+-- support for i18n
+local S = plantlife_i18n.gettext
+
+-- Maintain backward compatibilty
+-- minetest-0.5: Begin
+local default_ferns = minetest.registered_items["default:fern_1"] or false
+if default_ferns then
+ minetest.register_alias("ferns:fern_03", "default:fern_3")
+ minetest.register_alias("ferns:fern_02", "default:fern_2")
+ minetest.register_alias("ferns:fern_01", "default:fern_1")
+end
+-- minetest-0.5: End
+minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
+minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
+minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
+minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
+
+local nodenames = {}
+
+local function create_nodes()
+ local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
+ local vscales = { 1, math.sqrt(8), math.sqrt(11) }
+ local descs = { S("Lady-fern (Athyrium)"), nil, nil }
+
+ for i = 1, 3 do
+ local node_on_place = nil
+ if i == 1 then
+ node_on_place = function(itemstack, placer, pointed_thing)
+ -- place a random fern
+ local stack = ItemStack("ferns:fern_0"..math.random(1,4))
+ local ret = minetest.item_place(stack, placer, pointed_thing)
+ return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
+ end
+ end
+ nodenames[i] = "ferns:fern_"..string.format("%02d", i)
+ minetest.register_node(nodenames[i], {
+ description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
+ inventory_image = "ferns_fern.png",
+ drawtype = "plantlike",
+ visual_scale = vscales[i],
+ paramtype = "light",
+ tiles = { images[i] },
+ walkable = false,
+ buildable_to = true,
+ groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+ drop = "ferns:fern_01",
+ on_place = node_on_place
+ })
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+-- Init
+-----------------------------------------------------------------------------------------------
+
+if default_ferns then
+ for i = 1, 3 do
+ nodenames[i] = "ferns:fern_"..string.format("%02d", i)
+ end
+else
+ create_nodes()
+end
+
+-----------------------------------------------------------------------------------------------
+-- Spawning
+-----------------------------------------------------------------------------------------------
+
+if abstract_ferns.config.lady_ferns_near_tree == true then
+ biome_lib:register_generate_plant({ -- near trees (woodlands)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "default:desert_sand",
+ "default:sand",
+ "default:jungletree",
+ "stoneage:grass_with_silex",
+ "sumpf:sumpf"
+ },
+ max_count = 30,
+ rarity = 62,--63,
+ min_elevation = 1, -- above sea level
+ near_nodes = {"group:tree"},
+ near_nodes_size = 3,--4,
+ near_nodes_vertical = 2,--3,
+ near_nodes_count = 1,
+ 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
+
+if abstract_ferns.config.lady_ferns_near_rock == true then
+ biome_lib:register_generate_plant({ -- near stone (mountains)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "group:falling_node",
+ --"default:jungletree",
+ "stoneage:grass_with_silex",
+ "sumpf:sumpf"
+ },
+ max_count = 35,
+ rarity = 40,
+ min_elevation = 1, -- above sea level
+ near_nodes = {"group:stone"},
+ near_nodes_size = 1,
+ near_nodes_count = 16,
+ 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
+
+if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
+ biome_lib:register_generate_plant({ -- near ores (potential mining sites)
+ 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 = 1200,--1600, -- maybe too much? :D
+ rarity = 25,--15,
+ min_elevation = 1, -- above sea level
+ near_nodes = {
+ "default:stone_with_iron",
+ --"default:stone_with_copper",
+ --"default:stone_with_mese",
+ --"default:stone_with_gold",
+ --"default:stone_with_diamond",
+ "default:stone_with_tin", -- minetest >= 0.4.16
+ "moreores:mineral_tin",
+ "moreores:mineral_silver"
+ --"moreores:mineral_mithril"
+ },
+ near_nodes_size = 2,
+ near_nodes_vertical = 4,--5,--6,
+ near_nodes_count = 2,--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
+
+if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
+ biome_lib:register_generate_plant({
+ 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
diff --git a/ferns/gianttreefern.lua b/ferns/gianttreefern.lua
index c746194..60d3b82 100644
--- a/ferns/gianttreefern.lua
+++ b/ferns/gianttreefern.lua
@@ -2,8 +2,8 @@
-- Ferns - Giant Tree Fern 0.1.1
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
--- License (everything): WTFPL
--- Contains code from: biome_lib
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
-- Looked at code from: 4seasons, default
-- Supports: vines
-----------------------------------------------------------------------------------------------
@@ -297,6 +297,7 @@ if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
+ "default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
"default:sand",
"default:desert_sand"--,
--"dryplants:grass_short"
@@ -330,7 +331,7 @@ if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
neighbors = {"default:desert_sand"},
ncount = 1,
min_elevation = 1,
- near_nodes = {"default:water_source"},
+ near_nodes = {"default:water_source", "default:river_water_source"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
diff --git a/ferns/horsetail.lua b/ferns/horsetail.lua
index 16d1c90..3d1e0fc 100644
--- a/ferns/horsetail.lua
+++ b/ferns/horsetail.lua
@@ -2,10 +2,10 @@
-- Archae Plantae - Horsetail 0.0.5
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
--- License (everything): WTFPL
--- Contains code from: biome_lib
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
-- Looked at code from: default, flowers, trees
--- Dependencies: biome_lib
+-- Dependencies: biome_lib
-- Supports: dryplants, stoneage, sumpf
-----------------------------------------------------------------------------------------------
@@ -82,6 +82,7 @@ if abstract_ferns.config.enable_horsetails_spawning == true then
spawn_chance = 400,
spawn_surfaces = {
"default:dirt_with_grass",
+ "default:dirt_with_coniferous_litter", -- minetest >= 0.5
"default:desert_sand",
"default:sand",
"dryplants:grass_short",
@@ -91,7 +92,7 @@ if abstract_ferns.config.enable_horsetails_spawning == true then
},
seed_diff = 329,
min_elevation = 1, -- above sea level
- near_nodes = {"default:water_source","default:gravel"},
+ near_nodes = {"default:water_source","default:river_water_source","default:gravel"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
@@ -107,6 +108,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
+ "default:dirt_with_coniferous_litter", -- minetest >= 0.5
"sumpf:sumpf"
},
max_count = 35,
diff --git a/ferns/init.lua b/ferns/init.lua
index 6e7dcac..922d2c3 100644
--- a/ferns/init.lua
+++ b/ferns/init.lua
@@ -1,10 +1,10 @@
-----------------------------------------------------------------------------------------------
local title = "Ferns" -- former "Archae Plantae"
-local version = "0.2.0"
+local version = "0.2.1"
local mname = "ferns" -- former "archaeplantae"
-----------------------------------------------------------------------------------------------
-- (by Mossmanikin)
--- License (everything): WTFPL
+-- License (everything): WTFPL
-----------------------------------------------------------------------------------------------
abstract_ferns = {}
diff --git a/ferns/settings.lua b/ferns/settings.lua
index 8254fcf..0fcdfbb 100644
--- a/ferns/settings.lua
+++ b/ferns/settings.lua
@@ -1,6 +1,6 @@
-- In case you don't wanna have errors:
--- Only change what's behind a "=" (or "--").
+-- 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).
@@ -31,12 +31,12 @@ abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a
--
-- 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)
+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
+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
diff --git a/ferns/treefern.lua b/ferns/treefern.lua
index db4bc37..144d584 100644
--- a/ferns/treefern.lua
+++ b/ferns/treefern.lua
@@ -2,8 +2,8 @@
-- Ferns - Tree Fern 0.1.1
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
--- License (everything): WTFPL
--- Contains code from: biome_lib
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
-- Looked at code from: default , trees
-----------------------------------------------------------------------------------------------
@@ -31,20 +31,14 @@ abstract_ferns.grow_tree_fern = function(pos)
local i = 1
local brk = false
while (i < size) do
- print(minetest.get_node({x = pos.x, y = pos.y + i, z = pos.z}).name)
if minetest.get_node({x = pos.x, y = pos.y + i, z = pos.z}).name ~= "air" then
brk = true
- print("break!")
break
end
- print("set trunk node at:")
- print(dump({x = pos.x, y = pos.y + i, z = pos.z}))
minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = "ferns:fern_trunk" })
i = i + 1
end
if not brk then
- print("set crown node at:")
- print(dump({x = pos.x, y = pos.y + i, z = pos.z}))
minetest.set_node({x = pos.x, y = pos.y + i - 1, z = pos.z}, { name = crown })
end
end
@@ -189,6 +183,7 @@ if abstract_ferns.config.enable_treeferns_in_jungle == true then
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
+ "default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
"default:sand",
"default:desert_sand",
},
@@ -225,7 +220,7 @@ if abstract_ferns.config.enable_treeferns_in_oases == true then
neighbors = {"default:desert_sand"},
ncount = 1,
min_elevation = 1,
- near_nodes = {"default:water_source"},
+ near_nodes = {"default:water_source","default:river_water_source"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,