tweak code, fix missing deco

This commit is contained in:
tenplus1 2021-06-26 20:07:48 +01:00
parent 6c326963d2
commit 23e1d583ac
3 changed files with 35 additions and 26 deletions

View File

@ -25,7 +25,7 @@ local function setting(stype, name, default)
end
--generation settings
setting("number", "ymin", -30000) --bottom realm limit
setting("number", "ymin", -27000) --bottom realm limit (was -30000)
setting("number", "ymax", -1500) --top realm limit
setting("number", "tcave", 0.75) --cave threshold

View File

@ -184,15 +184,15 @@ function caverealms:crystal_stalagmite(x, y, z, area, data, biome)
end
local stalids = {
{ {c_crystore, c_crystal}, {c_emore, c_emerald} },
{ {c_emore, c_emerald}, {c_crystore, c_crystal} },
{ {c_emore, c_emerald}, {c_meseore, c_mesecry} },
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
{ {c_rubore, c_ruby}, {c_meseore, c_mesecry}},
{ {c_crystore, c_crystal}, {c_rubore, c_ruby} },
{ {c_rubore, c_ruby}, {c_emore, c_emerald}},
{ {c_amethore, c_ameth}, {c_meseore, c_mesecry} },
{{c_crystore, c_crystal}, {c_emore, c_emerald}},
{{c_emore, c_emerald}, {c_crystore, c_crystal}},
{{c_emore, c_emerald}, {c_meseore, c_mesecry}},
{{c_ice, c_thinice}, {c_crystore, c_crystal}},
{{c_ice, c_thinice}, {c_crystore, c_crystal}},
{{c_rubore, c_ruby}, {c_meseore, c_mesecry}},
{{c_crystore, c_crystal}, {c_rubore, c_ruby}},
{{c_rubore, c_ruby}, {c_emore, c_emerald}},
{{c_amethore, c_ameth}, {c_meseore, c_mesecry}}
}
local nid_a
@ -258,7 +258,7 @@ end
--crystal stalactite spawner
function caverealms:crystal_stalactite(x, y, z, area, data, biome)
if not caverealms:above_solid(x,y,z,area,data) then
if not caverealms:above_solid(x, y, z, area, data) then
return
end
@ -279,21 +279,22 @@ function caverealms:crystal_stalactite(x, y, z, area, data, biome)
end
if biome == 4 or biome == 5 then
if random(3) == 1 then
mode = 2
end
end
local stalids = {
{ {c_crystore, c_crystal}, {c_emore, c_emerald} },
{ {c_emore, c_emerald}, {c_crystore, c_crystal} },
{ {c_emore, c_emerald}, {c_meseore, c_mesecry} },
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
{ {c_rubore, c_ruby}, {c_meseore, c_mesecry}},
{ {c_crystore, c_crystal}, {c_rubore, c_ruby} },
{ {c_rubore, c_ruby}, {c_emore, c_emerald}},
{ {c_amethore, c_ameth}, {c_meseore, c_mesecry} },
{{c_crystore, c_crystal}, {c_emore, c_emerald}},
{{c_emore, c_emerald}, {c_crystore, c_crystal}},
{{c_emore, c_emerald}, {c_meseore, c_mesecry}},
{{c_ice, c_thinice}, {c_crystore, c_crystal}},
{{c_ice, c_thinice}, {c_crystore, c_crystal}},
{{c_rubore, c_ruby}, {c_meseore, c_mesecry}},
{{c_crystore, c_crystal}, {c_rubore, c_ruby}},
{{c_rubore, c_ruby}, {c_emore, c_emerald}},
{{c_amethore, c_ameth}, {c_meseore, c_mesecry}}
}
local nid_a
@ -359,7 +360,7 @@ end
--glowing crystal stalagmite spawner
function caverealms:salt_stalagmite(x, y, z, area, data, biome)
if not caverealms:below_solid(x,y,z,area,data) then
if not caverealms:below_solid(x, y, z, area, data) then
return
end
@ -415,6 +416,7 @@ function caverealms:giant_shroom(x, y, z, area, data)
end
z = z - 5
local vi
--cap
@ -445,17 +447,24 @@ function caverealms:giant_shroom(x, y, z, area, data)
end
end
local ai
--stem
for j = 0, 5 do
for k = -1, 1 do
vi = area:index(x + k, y + j, z)
data[vi] = c_stem
if k == 0 then
local ai = area:index(x, y + j, z + 1)
ai = area:index(x, y + j, z + 1)
data[ai] = c_stem
ai = area:index(x, y + j, z - 1)
data[ai] = c_stem
end
end

View File

@ -118,7 +118,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
--2D noise for biomes (will be 3D humidity/temp later)
local nvals_biome = minetest.get_perlin_map(np_biome,
chulens2D):get2dMap_flat({x = x0 + 150, y = z0 + 50})
chulens2D):get_2d_map_flat({x = x0 + 150, y = z0 + 50})
local nixyz = 1 --3D node index
local nixz = 1 --2D node index
@ -249,7 +249,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
data[vi] = c_moss
if random() < GEMCHA then
data[ai] = c_gem
data[ai] = c_gem1
end
elseif biome == 2 then
@ -301,7 +301,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
data[bi] = c_salt
if random() < GEMCHA then
data[ai] = c_saltgem
data[ai] = c_saltgem1
end
if random() < STAGCHA then
@ -343,7 +343,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
if random() < GEMCHA then
data[ai] = c_spike
data[ai] = c_spike1
end
end