mirror of
git://repo.or.cz/rocks.git
synced 2025-01-04 07:10:28 +01:00
Tuned and enabled pipes.
This commit is contained in:
parent
668d2f2262
commit
f82fd46656
@ -38,7 +38,7 @@ minetest.register_on_generated(function(minp,maxp,seed)
|
|||||||
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
|
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
|
||||||
rocksl.gensed(minp,maxp,seed,vm,area)
|
rocksl.gensed(minp,maxp,seed,vm,area)
|
||||||
--rocksl.genign
|
--rocksl.genign
|
||||||
--rocksl.genpipe(minp,maxp,seed,vm,area)
|
rocksl.genpipe(minp,maxp,seed,vm,area)
|
||||||
rocksl.genvein(minp,maxp,seed,vm,area)
|
rocksl.genvein(minp,maxp,seed,vm,area)
|
||||||
vm:write_to_map(data)
|
vm:write_to_map(data)
|
||||||
end)
|
end)
|
||||||
|
@ -24,7 +24,7 @@ rocksl.genpipe=function(minp,maxp,seed,vm,area)
|
|||||||
local minpxz = {x = minp.x, y = minp.z}
|
local minpxz = {x = minp.x, y = minp.z}
|
||||||
pr=pr or PseudoRandom(seed)
|
pr=pr or PseudoRandom(seed)
|
||||||
local c_sample=minetest.get_content_id("default:mese")
|
local c_sample=minetest.get_content_id("default:mese")
|
||||||
local sample_scarcity=8
|
local sample_scarcity=16
|
||||||
|
|
||||||
local numpipes_raw=(chunksize/sample_scarcity)
|
local numpipes_raw=(chunksize/sample_scarcity)
|
||||||
local numpipes = math.floor(numpipes_raw + (pr:next(0,99)/100))
|
local numpipes = math.floor(numpipes_raw + (pr:next(0,99)/100))
|
||||||
@ -33,11 +33,11 @@ rocksl.genpipe=function(minp,maxp,seed,vm,area)
|
|||||||
print("minp="..minp.x..","..minp.y..","..minp.z)
|
print("minp="..minp.x..","..minp.y..","..minp.z)
|
||||||
print("maxp="..maxp.x..","..maxp.y..","..maxp.z)
|
print("maxp="..maxp.x..","..maxp.y..","..maxp.z)
|
||||||
--local pointA=vector.add(minp,chunksize/2)
|
--local pointA=vector.add(minp,chunksize/2)
|
||||||
local pointA=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
--local pointA=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
||||||
draw_sphere(data,area,pointA,5,c_sample)
|
--draw_sphere(data,area,pointA,5,c_sample)
|
||||||
|
|
||||||
for vc=1, numpipes do
|
for vc=1, numpipes do
|
||||||
--local pointA=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
local pointA=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
||||||
local pointB=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
local pointB=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
||||||
local pointC=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
local pointC=vector.new(pr:next(0,chunksizer)+minp.x,pr:next(0,chunksizer)+minp.y,pr:next(0,chunksizer)+minp.z)
|
||||||
print("pointA="..pointA.x..","..pointA.y..","..pointA.z)
|
print("pointA="..pointA.x..","..pointA.y..","..pointA.z)
|
||||||
|
Loading…
Reference in New Issue
Block a user