forked from VoxeLibre/VoxeLibre
struct-api: export construct_nodes function
This commit is contained in:
parent
7f2ecb6ed0
commit
7fee2cd55a
|
@ -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
|
if def.loot then mcl_structures.fill_chests(p1,p2,def.loot,pr) end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function construct_nodes(pos,def,pr)
|
function mcl_structures.construct_nodes(p1,p2,nodes)
|
||||||
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)
|
local nn=minetest.find_nodes_in_area(p1,p2,nodes)
|
||||||
for _,p in pairs(nn) do
|
for _,p in pairs(nn) do
|
||||||
mcl_structures.init_node_construct(p)
|
mcl_structures.init_node_construct(p)
|
||||||
end
|
end
|
||||||
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)
|
function mcl_structures.find_lowest_y(pp)
|
||||||
local y = 31000
|
local y = 31000
|
||||||
|
|
Loading…
Reference in New Issue