2017-08-03 15:02:56 +02:00
|
|
|
-- support for i18n
|
|
|
|
local S = plantlife_i18n.gettext
|
2014-03-12 19:26:06 +01:00
|
|
|
|
2013-05-21 16:52:36 +02:00
|
|
|
-- This file supplies a few additional plants and some related crafts
|
2013-04-25 02:20:28 +02:00
|
|
|
-- for the plantlife modpack. Last revision: 2013-04-24
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2013-10-12 21:15:03 +02:00
|
|
|
flowers_plus = {}
|
|
|
|
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
local SPAWN_DELAY = 1000
|
|
|
|
local SPAWN_CHANCE = 200
|
2013-04-25 02:20:28 +02:00
|
|
|
local flowers_seed_diff = 329
|
2013-10-12 21:15:03 +02:00
|
|
|
local lilies_max_count = 320
|
|
|
|
local lilies_rarity = 33
|
|
|
|
local seaweed_max_count = 320
|
|
|
|
local seaweed_rarity = 33
|
2015-03-26 22:40:53 +01:00
|
|
|
local sunflowers_max_count = 10
|
2015-03-26 22:25:58 +01:00
|
|
|
local sunflowers_rarity = 25
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
-- register the various rotations of waterlilies
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
local lilies_list = {
|
2018-02-18 01:28:43 +01:00
|
|
|
{ nil , nil , 1 },
|
2013-10-12 21:15:03 +02:00
|
|
|
{ "225", "22.5" , 2 },
|
|
|
|
{ "45" , "45" , 3 },
|
|
|
|
{ "675", "67.5" , 4 },
|
|
|
|
{ "s1" , "small_1" , 5 },
|
|
|
|
{ "s2" , "small_2" , 6 },
|
|
|
|
{ "s3" , "small_3" , 7 },
|
|
|
|
{ "s4" , "small_4" , 8 },
|
2013-08-19 08:08:08 +02:00
|
|
|
}
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
for i in ipairs(lilies_list) do
|
|
|
|
local deg1 = ""
|
|
|
|
local deg2 = ""
|
|
|
|
local lily_groups = {snappy = 3,flammable=2,flower=1}
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
if lilies_list[i][1] ~= nil then
|
|
|
|
deg1 = "_"..lilies_list[i][1]
|
|
|
|
deg2 = "_"..lilies_list[i][2]
|
|
|
|
lily_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
|
|
|
|
end
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
minetest.register_node(":flowers:waterlily"..deg1, {
|
2014-03-12 19:26:06 +01:00
|
|
|
description = S("Waterlily"),
|
2013-08-19 08:08:08 +02:00
|
|
|
drawtype = "nodebox",
|
2017-08-03 15:02:56 +02:00
|
|
|
tiles = {
|
2013-10-12 21:15:03 +02:00
|
|
|
"flowers_waterlily"..deg2..".png",
|
|
|
|
"flowers_waterlily"..deg2..".png^[transformFY"
|
|
|
|
},
|
2013-08-19 08:08:08 +02:00
|
|
|
inventory_image = "flowers_waterlily.png",
|
|
|
|
wield_image = "flowers_waterlily.png",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
walkable = false,
|
|
|
|
groups = lily_groups,
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
|
|
|
|
},
|
|
|
|
buildable_to = true,
|
2016-06-17 20:57:23 +02:00
|
|
|
node_placement_prediction = "",
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
liquids_pointable = true,
|
|
|
|
drop = "flowers:waterlily",
|
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
local keys=placer:get_player_control()
|
|
|
|
local pt = pointed_thing
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
local place_pos = nil
|
|
|
|
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
|
|
|
local under_node = minetest.get_node(pt.under)
|
|
|
|
local above_node = minetest.get_node(pt.above)
|
|
|
|
local top_node = minetest.get_node(top_pos)
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
2013-08-19 08:08:08 +02:00
|
|
|
if under_node.name ~= "default:water_source" then
|
|
|
|
place_pos = pt.under
|
2017-08-03 15:02:56 +02:00
|
|
|
elseif top_node.name ~= "default:water_source"
|
2015-08-09 16:11:30 +02:00
|
|
|
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
2013-08-19 08:08:08 +02:00
|
|
|
place_pos = top_pos
|
|
|
|
else
|
|
|
|
return
|
|
|
|
end
|
2015-08-09 16:11:30 +02:00
|
|
|
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
2013-08-19 08:08:08 +02:00
|
|
|
place_pos = pt.above
|
|
|
|
end
|
|
|
|
|
2014-10-20 22:17:02 +02:00
|
|
|
if place_pos and not minetest.is_protected(place_pos, placer:get_player_name()) then
|
2013-08-19 08:08:08 +02:00
|
|
|
|
|
|
|
local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
|
|
|
|
|
|
|
|
if not keys["sneak"] then
|
2014-08-16 01:34:15 +02:00
|
|
|
local node = minetest.get_node(pt.under)
|
2013-10-12 21:15:03 +02:00
|
|
|
local waterlily = math.random(1,8)
|
2013-08-19 08:08:08 +02:00
|
|
|
if waterlily == 1 then
|
|
|
|
nodename = "flowers:waterlily"
|
|
|
|
elseif waterlily == 2 then
|
|
|
|
nodename = "flowers:waterlily_225"
|
|
|
|
elseif waterlily == 3 then
|
|
|
|
nodename = "flowers:waterlily_45"
|
|
|
|
elseif waterlily == 4 then
|
|
|
|
nodename = "flowers:waterlily_675"
|
2013-10-12 21:15:03 +02:00
|
|
|
elseif waterlily == 5 then
|
|
|
|
nodename = "flowers:waterlily_s1"
|
|
|
|
elseif waterlily == 6 then
|
|
|
|
nodename = "flowers:waterlily_s2"
|
|
|
|
elseif waterlily == 7 then
|
|
|
|
nodename = "flowers:waterlily_s3"
|
|
|
|
elseif waterlily == 8 then
|
|
|
|
nodename = "flowers:waterlily_s4"
|
2013-08-19 08:08:08 +02:00
|
|
|
end
|
2014-08-16 01:34:15 +02:00
|
|
|
minetest.set_node(place_pos, {name = nodename, param2 = math.random(0,3) })
|
2013-08-19 08:08:08 +02:00
|
|
|
else
|
|
|
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
2014-08-16 01:34:15 +02:00
|
|
|
minetest.set_node(place_pos, {name = "flowers:waterlily", param2 = fdir})
|
2013-08-19 08:08:08 +02:00
|
|
|
end
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
if not biome_lib.expect_infinite_stacks then
|
2013-08-19 08:08:08 +02:00
|
|
|
itemstack:take_item()
|
|
|
|
end
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2013-10-12 21:15:03 +02:00
|
|
|
local algae_list = { {nil}, {2}, {3}, {4} }
|
|
|
|
|
|
|
|
for i in ipairs(algae_list) do
|
|
|
|
local num = ""
|
|
|
|
local algae_groups = {snappy = 3,flammable=2,flower=1}
|
|
|
|
|
|
|
|
if algae_list[i][1] ~= nil then
|
|
|
|
num = "_"..algae_list[i][1]
|
|
|
|
algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
|
|
|
|
end
|
2017-08-03 15:02:56 +02:00
|
|
|
|
2013-10-12 21:15:03 +02:00
|
|
|
minetest.register_node(":flowers:seaweed"..num, {
|
2014-03-12 19:26:06 +01:00
|
|
|
description = S("Seaweed"),
|
2013-10-12 21:15:03 +02:00
|
|
|
drawtype = "nodebox",
|
2017-08-03 15:02:56 +02:00
|
|
|
tiles = {
|
2013-10-12 21:15:03 +02:00
|
|
|
"flowers_seaweed"..num..".png",
|
|
|
|
"flowers_seaweed"..num..".png^[transformFY"
|
|
|
|
},
|
|
|
|
inventory_image = "flowers_seaweed_2.png",
|
|
|
|
wield_image = "flowers_seaweed_2.png",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
walkable = false,
|
|
|
|
groups = algae_groups,
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
|
2017-08-03 15:02:56 +02:00
|
|
|
},
|
2013-10-12 21:15:03 +02:00
|
|
|
buildable_to = true,
|
2017-08-03 15:02:56 +02:00
|
|
|
|
2013-10-12 21:15:03 +02:00
|
|
|
liquids_pointable = true,
|
|
|
|
drop = "flowers:seaweed",
|
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
local keys=placer:get_player_control()
|
|
|
|
local pt = pointed_thing
|
|
|
|
|
|
|
|
local place_pos = nil
|
|
|
|
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
|
|
|
local under_node = minetest.get_node(pt.under)
|
|
|
|
local above_node = minetest.get_node(pt.above)
|
|
|
|
local top_node = minetest.get_node(top_pos)
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
2013-10-12 21:15:03 +02:00
|
|
|
if under_node.name ~= "default:water_source" then
|
|
|
|
place_pos = pt.under
|
2017-08-03 15:02:56 +02:00
|
|
|
elseif top_node.name ~= "default:water_source"
|
2015-08-09 16:11:30 +02:00
|
|
|
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
2013-10-12 21:15:03 +02:00
|
|
|
place_pos = top_pos
|
|
|
|
else
|
|
|
|
return
|
|
|
|
end
|
2015-08-09 16:11:30 +02:00
|
|
|
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
2013-10-12 21:15:03 +02:00
|
|
|
place_pos = pt.above
|
|
|
|
end
|
|
|
|
|
2014-06-23 04:20:51 +02:00
|
|
|
if not minetest.is_protected(place_pos, placer:get_player_name()) then
|
2013-10-12 21:15:03 +02:00
|
|
|
|
|
|
|
local nodename = "default:cobble" -- :D
|
|
|
|
|
|
|
|
if not keys["sneak"] then
|
2014-08-16 01:34:15 +02:00
|
|
|
--local node = minetest.get_node(pt.under)
|
2013-10-12 21:15:03 +02:00
|
|
|
local seaweed = math.random(1,4)
|
|
|
|
if seaweed == 1 then
|
|
|
|
nodename = "flowers:seaweed"
|
|
|
|
elseif seaweed == 2 then
|
|
|
|
nodename = "flowers:seaweed_2"
|
|
|
|
elseif seaweed == 3 then
|
|
|
|
nodename = "flowers:seaweed_3"
|
|
|
|
elseif seaweed == 4 then
|
|
|
|
nodename = "flowers:seaweed_4"
|
|
|
|
end
|
2014-08-16 01:34:15 +02:00
|
|
|
minetest.set_node(place_pos, {name = nodename, param2 = math.random(0,3) })
|
2013-10-12 21:15:03 +02:00
|
|
|
else
|
|
|
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
2014-08-16 01:34:15 +02:00
|
|
|
minetest.set_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
|
2013-10-12 21:15:03 +02:00
|
|
|
end
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
if not biome_lib.expect_infinite_stacks then
|
2013-10-12 21:15:03 +02:00
|
|
|
itemstack:take_item()
|
|
|
|
end
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2015-03-26 20:13:45 +01:00
|
|
|
local box = {
|
|
|
|
type="fixed",
|
|
|
|
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
|
|
|
|
}
|
|
|
|
|
2015-07-27 08:44:11 +02:00
|
|
|
local sunflower_drop = "farming:seed_wheat"
|
2017-08-03 15:02:56 +02:00
|
|
|
if minetest.registered_items["farming:seed_spelt"] then
|
2015-07-27 08:44:11 +02:00
|
|
|
sunflower_drop = "farming:seed_spelt"
|
|
|
|
end
|
|
|
|
|
2015-03-26 20:13:45 +01:00
|
|
|
minetest.register_node(":flowers:sunflower", {
|
2017-08-03 15:02:56 +02:00
|
|
|
description = S("Sunflower"),
|
2015-03-26 20:13:45 +01:00
|
|
|
drawtype = "mesh",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
inventory_image = "flowers_sunflower_inv.png",
|
|
|
|
mesh = "flowers_sunflower.obj",
|
|
|
|
tiles = { "flowers_sunflower.png" },
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = { dig_immediate=3, flora=1, flammable=3 },
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = box,
|
|
|
|
collision_box = box,
|
2015-07-27 08:44:11 +02:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
|
|
|
{items = {sunflower_drop}, rarity = 8},
|
|
|
|
{items = {"flowers:sunflower"}},
|
|
|
|
}
|
2015-03-26 20:13:45 +01:00
|
|
|
}
|
2015-07-27 08:44:11 +02:00
|
|
|
})
|
2015-03-26 20:13:45 +01:00
|
|
|
|
2013-04-25 02:20:28 +02:00
|
|
|
local extra_aliases = {
|
|
|
|
"waterlily",
|
|
|
|
"waterlily_225",
|
|
|
|
"waterlily_45",
|
|
|
|
"waterlily_675",
|
|
|
|
"seaweed"
|
|
|
|
}
|
|
|
|
|
|
|
|
for i in ipairs(extra_aliases) do
|
2013-12-15 19:41:07 +01:00
|
|
|
local flower = extra_aliases[i]
|
2013-04-25 02:20:28 +02:00
|
|
|
minetest.register_alias("flowers:flower_"..flower, "flowers:"..flower)
|
|
|
|
end
|
|
|
|
|
2013-10-12 21:15:03 +02:00
|
|
|
minetest.register_alias( "trunks:lilypad" , "flowers:waterlily_s1" )
|
|
|
|
minetest.register_alias( "along_shore:lilypads_1" , "flowers:waterlily_s1" )
|
|
|
|
minetest.register_alias( "along_shore:lilypads_2" , "flowers:waterlily_s2" )
|
|
|
|
minetest.register_alias( "along_shore:lilypads_3" , "flowers:waterlily_s3" )
|
|
|
|
minetest.register_alias( "along_shore:lilypads_4" , "flowers:waterlily_s4" )
|
|
|
|
minetest.register_alias( "along_shore:pondscum_1" , "flowers:seaweed" )
|
|
|
|
minetest.register_alias( "along_shore:seaweed_1" , "flowers:seaweed" )
|
|
|
|
minetest.register_alias( "along_shore:seaweed_2" , "flowers:seaweed_2" )
|
|
|
|
minetest.register_alias( "along_shore:seaweed_3" , "flowers:seaweed_3" )
|
|
|
|
minetest.register_alias( "along_shore:seaweed_4" , "flowers:seaweed_4" )
|
|
|
|
|
|
|
|
-- ongen registrations
|
|
|
|
|
|
|
|
flowers_plus.grow_waterlily = function(pos)
|
|
|
|
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
|
|
|
for i in ipairs(lilies_list) do
|
|
|
|
local chance = math.random(1,8)
|
|
|
|
local ext = ""
|
|
|
|
local num = lilies_list[i][3]
|
|
|
|
|
|
|
|
if lilies_list[i][1] ~= nil then
|
|
|
|
ext = "_"..lilies_list[i][1]
|
|
|
|
end
|
2017-08-03 15:02:56 +02:00
|
|
|
|
2013-10-12 21:15:03 +02:00
|
|
|
if chance == num then
|
2014-08-16 01:34:15 +02:00
|
|
|
minetest.set_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
|
2013-10-12 21:15:03 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:register_generate_plant({
|
2013-10-12 21:15:03 +02:00
|
|
|
surface = {"default:water_source"},
|
2014-07-02 01:51:04 +02:00
|
|
|
max_count = lilies_max_count,
|
|
|
|
rarity = lilies_rarity,
|
2013-10-12 21:15:03 +02:00
|
|
|
min_elevation = 1,
|
|
|
|
max_elevation = 40,
|
|
|
|
near_nodes = {"default:dirt_with_grass"},
|
|
|
|
near_nodes_size = 4,
|
|
|
|
near_nodes_vertical = 1,
|
|
|
|
near_nodes_count = 1,
|
|
|
|
plantlife_limit = -0.9,
|
|
|
|
temp_max = -0.22,
|
|
|
|
temp_min = 0.22,
|
|
|
|
},
|
2014-08-15 16:09:01 +02:00
|
|
|
flowers_plus.grow_waterlily
|
2013-10-12 21:15:03 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
flowers_plus.grow_seaweed = function(pos)
|
|
|
|
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
2014-08-16 01:34:15 +02:00
|
|
|
minetest.set_node(right_here, {name="along_shore:seaweed_"..math.random(1,4), param2=math.random(1,3)})
|
2013-10-12 21:15:03 +02:00
|
|
|
end
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:register_generate_plant({
|
2013-10-12 21:15:03 +02:00
|
|
|
surface = {"default:water_source"},
|
|
|
|
max_count = seaweed_max_count,
|
|
|
|
rarity = seaweed_rarity,
|
|
|
|
min_elevation = 1,
|
|
|
|
max_elevation = 40,
|
|
|
|
near_nodes = {"default:dirt_with_grass"},
|
|
|
|
near_nodes_size = 4,
|
|
|
|
near_nodes_vertical = 1,
|
|
|
|
near_nodes_count = 1,
|
|
|
|
plantlife_limit = -0.9,
|
|
|
|
},
|
2014-08-15 16:09:01 +02:00
|
|
|
flowers_plus.grow_seaweed
|
2013-10-12 21:15:03 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
-- seaweed at beaches
|
|
|
|
-- MM: not satisfied with it, but IMHO some beaches should have some algae
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:register_generate_plant({
|
2013-10-12 21:15:03 +02:00
|
|
|
surface = {"default:water_source"},
|
|
|
|
max_count = seaweed_max_count,
|
|
|
|
rarity = seaweed_rarity,
|
|
|
|
min_elevation = 1,
|
|
|
|
max_elevation = 40,
|
|
|
|
near_nodes = {"default:sand"},
|
|
|
|
near_nodes_size = 1,
|
|
|
|
near_nodes_vertical = 0,
|
|
|
|
near_nodes_count = 3,
|
|
|
|
plantlife_limit = -0.9,
|
|
|
|
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
|
|
|
|
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
|
|
|
|
},
|
2014-08-15 16:09:01 +02:00
|
|
|
flowers_plus.grow_seaweed
|
2013-10-12 21:15:03 +02:00
|
|
|
)
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:register_generate_plant({
|
2013-10-12 21:15:03 +02:00
|
|
|
surface = {"default:sand"},
|
|
|
|
max_count = seaweed_max_count*2,
|
|
|
|
rarity = seaweed_rarity/2,
|
|
|
|
min_elevation = 1,
|
|
|
|
max_elevation = 40,
|
|
|
|
near_nodes = {"default:water_source"},
|
|
|
|
near_nodes_size = 1,
|
|
|
|
near_nodes_vertical = 0,
|
|
|
|
near_nodes_count = 3,
|
|
|
|
plantlife_limit = -0.9,
|
|
|
|
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
|
|
|
|
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
|
|
|
|
},
|
2014-08-15 16:09:01 +02:00
|
|
|
flowers_plus.grow_seaweed
|
2013-10-12 21:15:03 +02:00
|
|
|
)
|
2015-03-26 20:13:45 +01:00
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:register_generate_plant({
|
2015-03-26 20:13:45 +01:00
|
|
|
surface = {"default:dirt_with_grass"},
|
2015-03-26 22:25:58 +01:00
|
|
|
avoid_nodes = { "flowers:sunflower" },
|
2015-03-26 20:13:45 +01:00
|
|
|
max_count = sunflowers_max_count,
|
|
|
|
rarity = sunflowers_rarity,
|
2015-03-26 22:25:58 +01:00
|
|
|
min_elevation = 0,
|
2015-03-26 20:13:45 +01:00
|
|
|
plantlife_limit = -0.9,
|
2015-03-26 22:25:58 +01:00
|
|
|
temp_max = 0.53,
|
|
|
|
random_facedir = {0,3},
|
2015-03-26 20:13:45 +01:00
|
|
|
},
|
2015-03-26 22:25:58 +01:00
|
|
|
"flowers:sunflower"
|
2015-03-26 20:13:45 +01:00
|
|
|
)
|
|
|
|
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
-- spawn ABM registrations
|
2012-12-03 23:20:50 +01:00
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:spawn_on_surfaces({
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
spawn_delay = SPAWN_DELAY/2,
|
|
|
|
spawn_plants = {
|
2013-04-25 02:20:28 +02:00
|
|
|
"flowers:waterlily",
|
|
|
|
"flowers:waterlily_225",
|
|
|
|
"flowers:waterlily_45",
|
2013-10-12 21:15:03 +02:00
|
|
|
"flowers:waterlily_675",
|
|
|
|
"flowers:waterlily_s1",
|
|
|
|
"flowers:waterlily_s2",
|
|
|
|
"flowers:waterlily_s3",
|
|
|
|
"flowers:waterlily_s4"
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
},
|
|
|
|
avoid_radius = 2.5,
|
|
|
|
spawn_chance = SPAWN_CHANCE*4,
|
|
|
|
spawn_surfaces = {"default:water_source"},
|
2013-04-26 11:36:51 +02:00
|
|
|
avoid_nodes = {"group:flower", "group:flora" },
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
seed_diff = flowers_seed_diff,
|
|
|
|
light_min = 9,
|
|
|
|
depth_max = 2,
|
2013-03-24 05:23:16 +01:00
|
|
|
random_facedir = {0,3}
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
})
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:spawn_on_surfaces({
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
spawn_delay = SPAWN_DELAY*2,
|
2013-04-25 02:20:28 +02:00
|
|
|
spawn_plants = {"flowers:seaweed"},
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
spawn_chance = SPAWN_CHANCE*2,
|
|
|
|
spawn_surfaces = {"default:water_source"},
|
2013-04-26 11:36:51 +02:00
|
|
|
avoid_nodes = {"group:flower", "group:flora"},
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
seed_diff = flowers_seed_diff,
|
|
|
|
light_min = 4,
|
|
|
|
light_max = 10,
|
|
|
|
neighbors = {"default:dirt_with_grass"},
|
|
|
|
facedir = 1
|
|
|
|
})
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:spawn_on_surfaces({
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
spawn_delay = SPAWN_DELAY*2,
|
2013-04-25 02:20:28 +02:00
|
|
|
spawn_plants = {"flowers:seaweed"},
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
spawn_chance = SPAWN_CHANCE*2,
|
|
|
|
spawn_surfaces = {"default:dirt_with_grass"},
|
2013-04-26 11:36:51 +02:00
|
|
|
avoid_nodes = {"group:flower", "group:flora" },
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
seed_diff = flowers_seed_diff,
|
|
|
|
light_min = 4,
|
|
|
|
light_max = 10,
|
|
|
|
neighbors = {"default:water_source"},
|
|
|
|
ncount = 1,
|
|
|
|
facedir = 1
|
|
|
|
})
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:spawn_on_surfaces({
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
spawn_delay = SPAWN_DELAY*2,
|
2013-04-25 02:20:28 +02:00
|
|
|
spawn_plants = {"flowers:seaweed"},
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
spawn_chance = SPAWN_CHANCE*2,
|
|
|
|
spawn_surfaces = {"default:stone"},
|
2013-04-26 11:36:51 +02:00
|
|
|
avoid_nodes = {"group:flower", "group:flora" },
|
Changed plants_lib API to require a table argument when not using legacy
calling options. This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.
Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water. Fixed a few other misc. bugs.
Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().
Tuned flowers settings. Made flowers require at least some light to spawn,
made waterlilies require shallower water. Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.
Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture. Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.
Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod. Fixed a misspelled folder name for
poisonivy.
Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.
Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.
Many other features and enhancements have been made. Too many to list here.
Please see API.txt for details.
2013-01-25 05:21:57 +01:00
|
|
|
seed_diff = flowers_seed_diff,
|
|
|
|
light_min = 4,
|
|
|
|
light_max = 10,
|
|
|
|
neighbors = {"default:water_source"},
|
|
|
|
ncount = 6,
|
|
|
|
facedir = 1
|
|
|
|
})
|
|
|
|
|
2015-08-09 16:11:30 +02:00
|
|
|
biome_lib:spawn_on_surfaces({
|
2015-03-26 20:13:45 +01:00
|
|
|
spawn_delay = SPAWN_DELAY*2,
|
|
|
|
spawn_plants = {"flowers:sunflower"},
|
|
|
|
spawn_chance = SPAWN_CHANCE*2,
|
|
|
|
spawn_surfaces = {"default:dirt_with_grass"},
|
2015-04-13 06:08:01 +02:00
|
|
|
avoid_nodes = {"group:flower", "flowers:sunflower"},
|
2015-03-26 20:13:45 +01:00
|
|
|
seed_diff = flowers_seed_diff,
|
2015-03-26 22:25:58 +01:00
|
|
|
light_min = 11,
|
2015-03-26 20:13:45 +01:00
|
|
|
light_max = 14,
|
2015-03-26 22:25:58 +01:00
|
|
|
min_elevation = 0,
|
|
|
|
plantlife_limit = -0.9,
|
|
|
|
temp_max = 0.53,
|
2015-04-13 06:08:01 +02:00
|
|
|
random_facedir = {0,3},
|
|
|
|
avoid_radius = 5
|
2015-03-26 20:13:45 +01:00
|
|
|
})
|
|
|
|
|
2013-08-19 08:08:08 +02:00
|
|
|
-- Cotton plants are now provided by the default "farming" mod.
|
|
|
|
-- old cotton plants -> farming cotton stage 8
|
|
|
|
-- cotton wads -> string (can be crafted into wool blocks)
|
|
|
|
-- potted cotton plants -> potted white dandelions
|
|
|
|
|
2017-08-03 15:02:56 +02:00
|
|
|
minetest.register_alias("flowers:cotton_plant", "farming:cotton_8")
|
2013-08-19 08:08:08 +02:00
|
|
|
minetest.register_alias("flowers:flower_cotton", "farming:cotton_8")
|
|
|
|
minetest.register_alias("flowers:flower_cotton_pot", "flowers:potted_dandelion_white")
|
|
|
|
minetest.register_alias("flowers:potted_cotton_plant", "flowers:potted_dandelion_white")
|
|
|
|
minetest.register_alias("flowers:cotton", "farming:string")
|
|
|
|
minetest.register_alias("flowers:cotton_wad", "farming:string")
|
2015-03-26 20:13:45 +01:00
|
|
|
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")
|
2013-08-19 08:08:08 +02:00
|
|
|
|
2014-03-20 01:44:00 +01:00
|
|
|
print(S("[Flowers] Loaded."))
|