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 local dy = y - minp.y
if dy > 32 and cloud_1[index] > 15 and dy < 47 then if dy > 32 and cloud_1[index] > 15 and dy < 47 then
if dy < 48 - (cloud_1[index] - 15) then if dy < 48 - (cloud_1[index] - 15) then
if rand(200) == 1 then
data[ivm] = node['fun_caves:silver_lining']
else
data[ivm] = node['fun_caves:'..cloud] data[ivm] = node['fun_caves:'..cloud]
end
else else
data[ivm] = node['default:water_source'] data[ivm] = node['default:water_source']
write = true write = true
end 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 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
if rand(200) == 1 then
data[ivm] = node['fun_caves:silver_lining']
else
data[ivm] = node['fun_caves:'..cloud] data[ivm] = node['fun_caves:'..cloud]
end
write = true write = true
elseif data[ivm - area.ystride] == node['fun_caves:'..cloud] and data[ivm] == node['air'] then 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 if rand(30) == 1 and plant_n[index] > 0.5 then

View file

@ -88,3 +88,14 @@ minetest.register_node("fun_caves:lumin_tree", {
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
newnode = fun_caves.clone_node("default:stone_with_iron")
newnode.description = "Silver Lining"
newnode.tiles = {'fun_caves_cloud.png^default_mineral_coal.png^[colorize:#FFFFFF:175'}
newnode.drop = "fun_caves:silver_lump"
minetest.register_node("fun_caves:silver_lining", newnode)
minetest.register_craftitem("fun_caves:silver_lump", {
description = "Lump of Silver",
inventory_image = 'default_coal_lump.png^[colorize:#FFFFFF:175',
})

View file

@ -7,4 +7,6 @@ mobs?
mobs_monster? mobs_monster?
mobs_slimes? mobs_slimes?
mobs_creeper? mobs_creeper?
kpgmobs?
mobs_fish?
dmobs? dmobs?

View file

@ -384,7 +384,7 @@ minetest.register_craftitem("fun_caves:meteoritic_iron_crucible", {
drawtype = "plantlike", drawtype = "plantlike",
paramtype = "light", paramtype = "light",
tiles = {"fun_caves_crucible.png"}, tiles = {"fun_caves_crucible.png"},
inventory_image = "crucible.png", inventory_image = "fun_caves_crucible.png",
groups = {dig_immediate = 3}, groups = {dig_immediate = 3},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })