added double stone check for ceilings

This commit is contained in:
tenplus1 2022-07-01 12:47:28 +01:00
parent 331b898d18
commit 138abf45b0
5 changed files with 19 additions and 11 deletions

View File

@ -100,7 +100,7 @@ if minetest.get_modpath("ethereal") then
recipe = {
{"","","default:steel_ingot"},
{"", "default:steel_ingot", "caverealms:mushroom_gills"},
{"default:steel_ingot", "", "caverealms:mushroom_gills"},
{"default:steel_ingot", "", "caverealms:mushroom_gills"}
}
})

View File

@ -398,7 +398,6 @@ function caverealms:salt_stalagmite(x, y, z, area, data, biome)
for j = 2, scale + 2 do --y
for k = -2, scale - 2 do
for l = -2, scale - 2 do
vi = area:index(x + k, y + j, z + l)
data[vi] = c_salt -- make cube
end

View File

@ -134,7 +134,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local nixz = 1 --2D node index
local nixyz2 = 1 --second 3D index for second loop
local vi, ai, bi, bbi, bbbi, c_selected_worm, is_deep
local vi, ai, aii, bi, bbi, bbbi, c_selected_worm, is_deep
local biome, n_biome, gems, gidx, spikes, sidx
for z = z0, z1 do -- for each xy plane progressing northwards
@ -142,13 +142,13 @@ minetest.register_on_generated(function(minp, maxp, seed)
--increment indices
nixyz = nixyz + 1
--decoration loop
for y = y0, y1 do -- for each x row progressing upwards
c_selected_worm = c_worm
is_deep = false
if y < DEEP_CAVE then
is_deep = true
end
@ -212,8 +212,10 @@ minetest.register_on_generated(function(minp, maxp, seed)
--ceiling
ai = area:index(x, y + 1, z) --above index
aii = area:index(x, y + 2, z) --above above index
if data[ai] == c_stone and data[vi] == c_air then --ceiling
if data[aii] == c_stone
and data[ai] == c_stone and data[vi] == c_air then --ceiling
if random() < ICICHA and (biome == 4 or biome == 5) then
data[vi] = c_icid
@ -279,9 +281,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
elseif biome == 3 then
data[vi] = c_algae
elseif biome == 4 then
data[vi] = c_thinice
bi = area:index(x, y - 1, z)
data[bi] = c_thinice
@ -291,6 +295,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
elseif biome == 5 then
data[vi] = c_ice
bi = area:index(x, y - 1, z)
data[bi] = c_ice
@ -300,12 +305,15 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
elseif biome == 6 then
data[vi] = c_hcobble
if random() < FLACHA then --neverending flames
data[ai] = c_flame
end
elseif biome == 7 then
bi = area:index(x, y - 1, z)
data[vi] = c_salt
data[bi] = c_salt
@ -319,6 +327,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
elseif biome == 8 then
bi = area:index(x, y - 1, z)
if random() < 0.5 then
@ -334,6 +343,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
elseif biome == 9 then
bi = area:index(x, y - 1, z)
if random() < 0.05 then

View File

@ -222,7 +222,7 @@ minetest.register_node("caverealms:icicle_up", {
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}
},
}
})
--downward pointing icicle
@ -244,7 +244,7 @@ minetest.register_node("caverealms:icicle_down", {
selection_box = {
type = "fixed",
fixed = {-0.5, 7/16, -0.5, 0.5, 0.5, 0.5}
},
}
})
--cave mossy cobble - bluish?
@ -467,7 +467,7 @@ else
drawtype = "plantlike",
tiles = {{
name = "fire_basic_flame_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1},
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1}
}},
inventory_image = "fire_basic_flame.png",
light_source = 14,

View File

@ -111,8 +111,7 @@ local add_tree = function (pos, ofx, ofy, ofz, schem)
-- remove sapling and place schematic
minetest.swap_node(pos, {name = "air"})
minetest.place_schematic(
{x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz},
schem, 0, nil, false)
{x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz}, schem, 0, nil, false)
end
@ -188,7 +187,7 @@ minetest.register_abm({
nodenames = {
"caverealms:stone_with_moss",
"caverealms:stone_with_lichen",
"caverealms:stone_with_algae",
"caverealms:stone_with_algae"
},
neighbors = {"air"},
interval = 16,