mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2024-11-05 09:50:27 +01:00
Merge branch 'api-tweak'
This commit is contained in:
commit
a60f89a8a2
3
API.txt
3
API.txt
|
@ -331,7 +331,8 @@ biome = {
|
|||
-- empty region above the spawn target.
|
||||
-- Useful when adding trees to snow biomes.
|
||||
-- Defaults to false.
|
||||
spawn_replace_node = bool -- same as with the ABM spawner.
|
||||
spawn_replace_node = bool, -- same as with the ABM spawner.
|
||||
random_facedir = {table}, -- same as with the ABM spawner.
|
||||
}
|
||||
|
||||
Regarding node_or_function_or_treedef, this must either be table with an
|
||||
|
|
|
@ -287,7 +287,11 @@ function plantslib:generate_block_with_air_checking(minp, maxp, blockseed)
|
|||
spawned = true
|
||||
elseif objtype == "string" and
|
||||
minetest.registered_nodes[node_or_function_or_model] then
|
||||
minetest.set_node(p_top, { name = node_or_function_or_model })
|
||||
local fdir = nil
|
||||
if biome.random_facedir then
|
||||
fdir = math.random(biome.random_facedir[1], biome.random_facedir[2])
|
||||
end
|
||||
minetest.set_node(p_top, { name = node_or_function_or_model, param2 = fdir })
|
||||
spawned = true
|
||||
elseif objtype == "function" then
|
||||
node_or_function_or_model(pos)
|
||||
|
@ -403,7 +407,11 @@ function plantslib:generate_block_no_air_check(minp, maxp, blockseed)
|
|||
spawned = true
|
||||
elseif objtype == "string" and
|
||||
minetest.registered_nodes[node_or_function_or_model] then
|
||||
minetest.set_node(p_top, { name = node_or_function_or_model })
|
||||
local fdir = nil
|
||||
if biome.random_facedir then
|
||||
fdir = math.random(biome.random_facedir[1], biome.random_facedir[2])
|
||||
end
|
||||
minetest.set_node(p_top, { name = node_or_function_or_model, param2 = fdir })
|
||||
spawned = true
|
||||
elseif objtype == "function" then
|
||||
node_or_function_or_model(pos)
|
||||
|
|
Loading…
Reference in New Issue
Block a user