Add minerals to clouds.

This commit is contained in:
Duane 2016-06-12 00:47:07 -05:00
parent 03f29b1cd8
commit dc05865839
4 changed files with 24 additions and 3 deletions

View file

@ -51,13 +51,21 @@ fun_caves.cloudgen = function(minp, maxp, data, p2data, area, node)
local dy = y - minp.y
if dy > 32 and cloud_1[index] > 15 and dy < 47 then
if dy < 48 - (cloud_1[index] - 15) then
data[ivm] = node['fun_caves:'..cloud]
if rand(200) == 1 then
data[ivm] = node['fun_caves:silver_lining']
else
data[ivm] = node['fun_caves:'..cloud]
end
else
data[ivm] = node['default:water_source']
write = true
end
elseif cloud_1[index] > 0 and (dy <= 32 or cloud_1[index] <= 15) and dy >= 32 - cloud_1[index] and dy <= 32 + cloud_1[index] then
data[ivm] = node['fun_caves:'..cloud]
if rand(200) == 1 then
data[ivm] = node['fun_caves:silver_lining']
else
data[ivm] = node['fun_caves:'..cloud]
end
write = true
elseif data[ivm - area.ystride] == node['fun_caves:'..cloud] and data[ivm] == node['air'] then
if rand(30) == 1 and plant_n[index] > 0.5 then