forked from mtcontrib/plantlife_modpack
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
8e2148ffc3
@ -188,7 +188,7 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
@ -230,7 +230,7 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
|
@ -30,7 +30,7 @@ local modpath = minetest.get_modpath('bushes_classic')
|
||||
dofile(modpath..'/cooking.lua')
|
||||
dofile(modpath..'/nodes.lua')
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 3600,
|
||||
spawn_plants = bushes_classic.spawn_list,
|
||||
avoid_radius = 10,
|
||||
|
@ -1,6 +1,6 @@
|
||||
--Map Generation Stuff
|
||||
|
||||
biome_lib:register_generate_plant(
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
@ -20,7 +20,7 @@ biome_lib:register_generate_plant(
|
||||
}
|
||||
)
|
||||
|
||||
biome_lib:register_generate_plant(
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:desert_sand",
|
||||
|
@ -95,7 +95,7 @@ minetest.register_node("dryplants:juncus_02", {
|
||||
-- GENERATE SMALL JUNCUS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
@ -116,7 +116,7 @@ biome_lib:register_generate_plant({
|
||||
abstract_dryplants.grow_juncus
|
||||
)
|
||||
-- at dunes/beach
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
--"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
|
@ -11,7 +11,7 @@ abstract_dryplants.grow_grass_variation = function(pos)
|
||||
minetest.swap_node(pos, {name="dryplants:grass_short"})
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
},
|
||||
|
@ -7,7 +7,7 @@
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
biome_lib:register_generate_plant(
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
|
@ -330,7 +330,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- SPAWN REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[biome_lib:spawn_on_surfaces({
|
||||
--[[biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = {"dryplants:reedmace_sapling"},
|
||||
spawn_chance = 400,
|
||||
@ -351,7 +351,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-- GENERATE REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:desert_sand",
|
||||
@ -372,7 +372,7 @@ biome_lib:register_generate_plant({
|
||||
abstract_dryplants.grow_reedmace
|
||||
)
|
||||
-- in water
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt",
|
||||
"default:dirt_with_grass",
|
||||
@ -395,7 +395,7 @@ biome_lib:register_generate_plant({
|
||||
abstract_dryplants.grow_reedmace_water
|
||||
)
|
||||
-- for oases & tropical beaches & tropical swamps
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand",
|
||||
"sumpf:sumpf"
|
||||
|
@ -87,7 +87,7 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
biome_lib:register_generate_plant({ -- near trees (woodlands)
|
||||
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -116,7 +116,7 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
biome_lib:register_generate_plant({ -- near stone (mountains)
|
||||
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -143,7 +143,7 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
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)
|
||||
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -183,7 +183,7 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
|
||||
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({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
|
@ -298,7 +298,7 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
@ -324,7 +324,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
|
@ -75,7 +75,7 @@ create_nodes()
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = node_names,
|
||||
spawn_chance = 400,
|
||||
@ -104,7 +104,7 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||
@ -137,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:gravel", -- roots go deep
|
||||
"default:mossycobble",
|
||||
|
@ -179,7 +179,7 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
@ -208,7 +208,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
|
@ -80,16 +80,16 @@ for i in ipairs(lilies_list) do
|
||||
local above_node = minetest.get_node(pt.above)
|
||||
local top_node = minetest.get_node(top_pos)
|
||||
|
||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if under_node.name ~= "default:water_source" then
|
||||
place_pos = pt.under
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
return
|
||||
end
|
||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
||||
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
|
||||
place_pos = pt.above
|
||||
end
|
||||
|
||||
@ -180,18 +180,19 @@ for i in ipairs(algae_list) do
|
||||
local above_node = minetest.get_node(pt.above)
|
||||
local top_node = minetest.get_node(top_pos)
|
||||
|
||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if under_node.name ~= "default:water_source" then
|
||||
place_pos = pt.under
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
return
|
||||
end
|
||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
||||
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
|
||||
place_pos = pt.above
|
||||
end
|
||||
if not place_pos then return end -- something went wrong :P
|
||||
|
||||
if not minetest.is_protected(place_pos, placer:get_player_name()) then
|
||||
|
||||
@ -301,7 +302,7 @@ flowers_plus.grow_waterlily = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = lilies_max_count,
|
||||
rarity = lilies_rarity,
|
||||
@ -323,7 +324,7 @@ flowers_plus.grow_seaweed = function(pos)
|
||||
minetest.swap_node(right_here, {name="along_shore:seaweed_"..random(1,4), param2=random(1,3)})
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = seaweed_max_count,
|
||||
rarity = seaweed_rarity,
|
||||
@ -340,7 +341,7 @@ biome_lib:register_generate_plant({
|
||||
|
||||
-- seaweed at beaches
|
||||
-- MM: not satisfied with it, but IMHO some beaches should have some algae
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = seaweed_max_count,
|
||||
rarity = seaweed_rarity,
|
||||
@ -356,7 +357,7 @@ biome_lib:register_generate_plant({
|
||||
},
|
||||
flowers_plus.grow_seaweed
|
||||
)
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:sand"},
|
||||
max_count = seaweed_max_count*2,
|
||||
rarity = seaweed_rarity/2,
|
||||
@ -373,7 +374,7 @@ biome_lib:register_generate_plant({
|
||||
flowers_plus.grow_seaweed
|
||||
)
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
avoid_nodes = { "flowers:sunflower" },
|
||||
max_count = sunflowers_max_count,
|
||||
@ -388,7 +389,7 @@ biome_lib:register_generate_plant({
|
||||
|
||||
-- spawn ABM registrations
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY/2,
|
||||
spawn_plants = {
|
||||
"flowers:waterlily",
|
||||
@ -410,7 +411,7 @@ biome_lib:spawn_on_surfaces({
|
||||
random_facedir = {0,3}
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
@ -423,7 +424,7 @@ biome_lib:spawn_on_surfaces({
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
@ -437,7 +438,7 @@ biome_lib:spawn_on_surfaces({
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
@ -451,7 +452,7 @@ biome_lib:spawn_on_surfaces({
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:sunflower"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
|
@ -62,7 +62,7 @@ abstract_molehills.place_molehill = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Molehills_Max_Count,
|
||||
rarity = Molehills_Rarity,
|
||||
|
@ -70,7 +70,7 @@ minetest.register_node('poisonivy:climbing', {
|
||||
buildable_to = true,
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY,
|
||||
spawn_plants = {"poisonivy:seedling"},
|
||||
avoid_radius = 10,
|
||||
@ -83,7 +83,7 @@ biome_lib:spawn_on_surfaces({
|
||||
verticals_list = walls_list
|
||||
})
|
||||
|
||||
biome_lib:grow_plants({
|
||||
biome_lib.update_plant({
|
||||
grow_delay = SPAWN_DELAY,
|
||||
grow_chance = GROW_CHANCE,
|
||||
grow_plant = "poisonivy:seedling",
|
||||
@ -91,7 +91,7 @@ biome_lib:grow_plants({
|
||||
grow_nodes = {"default:dirt_with_grass"}
|
||||
})
|
||||
|
||||
biome_lib:grow_plants({
|
||||
biome_lib.update_plant({
|
||||
grow_delay = GROW_DELAY,
|
||||
grow_chance = GROW_CHANCE*2,
|
||||
grow_plant = "poisonivy:climbing",
|
||||
|
@ -169,7 +169,7 @@ abstract_trunks.place_twig = function(pos)
|
||||
end
|
||||
|
||||
if Twigs_on_ground == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Twigs_on_ground_Max_Count,
|
||||
rarity = Twigs_on_ground_Rarity,
|
||||
@ -186,7 +186,7 @@ biome_lib:register_generate_plant({
|
||||
end
|
||||
|
||||
if Twigs_on_water == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = Twigs_on_water_Max_Count,
|
||||
rarity = Twigs_on_water_Rarity,
|
||||
@ -348,7 +348,7 @@ abstract_trunks.place_trunk = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Trunks_Max_Count, -- 320,
|
||||
rarity = Trunks_Rarity, -- 99,
|
||||
@ -382,7 +382,7 @@ abstract_trunks.grow_moss_on_ground = function(pos)
|
||||
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Moss_on_ground_Max_Count,
|
||||
rarity = Moss_on_ground_Rarity,
|
||||
@ -471,7 +471,7 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
|
||||
--end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:tree",
|
||||
"default:jungletree",
|
||||
@ -548,7 +548,7 @@ abstract_trunks.grow_roots = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"group:tree"},
|
||||
max_count = 1000,
|
||||
rarity = 1,
|
||||
|
@ -135,7 +135,7 @@ vines.register_vine = function( name, defs, biome )
|
||||
end,
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces(biome)
|
||||
biome_lib.register_active_spawner(biome)
|
||||
end
|
||||
|
||||
-- ALIASES
|
||||
|
@ -73,7 +73,7 @@ abstract_woodsoils.place_soil = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"group:tree",
|
||||
"ferns:fern_03",
|
||||
@ -94,7 +94,7 @@ biome_lib:register_generate_plant({
|
||||
"abstract_woodsoils.place_soil"
|
||||
)
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"moretrees:apple_tree_sapling_ongen",
|
||||
"moretrees:beech_sapling_ongen",
|
||||
|
@ -134,7 +134,7 @@ abstract_youngtrees.grow_youngtree_node = function(pos, height)
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
|
Loading…
Reference in New Issue
Block a user