Checking for enviroment.

This commit is contained in:
Tomáš Brada 2015-07-02 16:01:27 +02:00
parent 4b1d998116
commit a7278f26d8
1 changed files with 11 additions and 5 deletions

View File

@ -32,13 +32,15 @@ end
depositgen.register_pipe({ depositgen.register_pipe({
ymin=-200, ymax=-6, ymin=-200, ymax=-6,
scarcity=80, scarcity=80,
width=1, width=4,
content="default:wood", content="default:glass",
scatter={ scatter={
{ scarcity=7, density=4, content="default:mese", size=1 } { scarcity=7, density=4, content="default:mese", size=2 }
} }
}) })
depositgen.l.ToResolve.air={name="air"}
local function generate(minp,maxp,pr,vm,area) local function generate(minp,maxp,pr,vm,area)
local t1 = os.clock() local t1 = os.clock()
@ -80,7 +82,9 @@ local function generate(minp,maxp,pr,vm,area)
for z=ocz-ore.size, ocz+ore.size do for z=ocz-ore.size, ocz+ore.size do
if pr:next(0,ore.density)==0 then if pr:next(0,ore.density)==0 then
di=area:index(p.x+x,p.y+y,p.z+z) di=area:index(p.x+x,p.y+y,p.z+z)
data[di]=ore.content.id if data[di]==depositgen.l.ToResolve.air.id then
data[di]=ore.content.id
end
end end
end end end end end end
end end
@ -91,7 +95,9 @@ local function generate(minp,maxp,pr,vm,area)
for x= radiusn, radiusp do for x= radiusn, radiusp do
for z= radiusn, radiusp do for z= radiusn, radiusp do
di=area:index(p.x+x,p.y+y,p.z+z) di=area:index(p.x+x,p.y+y,p.z+z)
--data[di]=descr.content.id if data[di]==depositgen.l.ToResolve.air.id then
data[di]=descr.content.id
end
end end end end end end
--</brush> --</brush>
--brush(data,area,p,descr.radius,content,descr.scatter,orepr) --brush(data,area,p,descr.radius,content,descr.scatter,orepr)