mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 02:21:06 +01:00
struct-api: export construct_nodes function
This commit is contained in:
parent
7f2ecb6ed0
commit
7fee2cd55a
1 changed files with 6 additions and 2 deletions
|
@ -30,13 +30,17 @@ local function generate_loot(pos, def, pr)
|
|||
if def.loot then mcl_structures.fill_chests(p1,p2,def.loot,pr) end
|
||||
end
|
||||
|
||||
local function construct_nodes(pos,def,pr)
|
||||
local nn = minetest.find_nodes_in_area(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2),def.construct_nodes)
|
||||
function mcl_structures.construct_nodes(p1,p2,nodes)
|
||||
local nn=minetest.find_nodes_in_area(p1,p2,nodes)
|
||||
for _,p in pairs(nn) do
|
||||
mcl_structures.init_node_construct(p)
|
||||
end
|
||||
end
|
||||
|
||||
local function construct_nodes(pos,def,pr)
|
||||
return mcl_structures.construct_nodes(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2))
|
||||
end
|
||||
|
||||
|
||||
function mcl_structures.find_lowest_y(pp)
|
||||
local y = 31000
|
||||
|
|
Loading…
Reference in a new issue