Add minerals to giant trees. Raise fortresses to -33 max.

This could cause issues with really deep oceans, but I haven't seen any.
This commit is contained in:
Duane 2016-07-05 07:36:36 -05:00
parent 5d2bdcdaba
commit 518a8384fc
3 changed files with 49 additions and 6 deletions

View file

@ -15,6 +15,44 @@ newnode.tiles = {"fun_caves_tree.png"}
newnode.is_ground_content = false
minetest.register_node("fun_caves:tree", newnode)
newnode = fun_caves.clone_node("fun_caves:tree")
newnode.description = "Giant Wood With Mineral"
newnode.tiles = {"fun_caves_tree.png^fun_caves_mineral_aquamarine.png"}
-- This drop list is more complicated than it ought to be.
-- The lua documentation is inaccurate.
newnode.drop = {
max_items = 1,
items = {
{
items = { 'fun_caves:aquamarine', },
rarity = 10,
},
{
items = { 'fun_caves:moonstone', },
rarity = 10,
},
{
items = { 'fun_caves:garnet', },
rarity = 10,
},
{
items = { 'fun_caves:zoisite', },
rarity = 10,
},
{
items = { 'fun_caves:coral_gem', },
rarity = 30,
},
{
items = {
'fun_caves:meteorite',
},
rarity = 1,
},
},
}
minetest.register_node("fun_caves:tree_mineral", newnode)
minetest.register_craft({
output = 'default:wood 4',
recipe = {
@ -268,8 +306,12 @@ fun_caves.treegen = function(minp, maxp, data, p2data, area, node)
data[ivm] = node['fun_caves:diamondwood']
end
if data[ivm] ~= node['air'] and data[ivm] ~= node['fun_caves:weightless_water'] and math_random(500) == 1 then
data[ivm] = node['fun_caves:sap']
if data[ivm] ~= node['air'] and data[ivm] ~= node['fun_caves:weightless_water'] then
if math_random(500) == 1 then
data[ivm] = node['fun_caves:sap']
elseif math_random(1000) == 1 then
data[ivm] = node['fun_caves:tree_mineral']
end
end
write = true
elseif y < 222 and y > -132 and distance < r + 2 then