tweaking level2 biomes a bit

This commit is contained in:
FaceDeer 2017-03-19 20:24:45 -06:00
parent b6fa28c381
commit 7f4181be76
3 changed files with 15 additions and 21 deletions

View File

@ -32,7 +32,7 @@ local level_1_tower_cap_floor = function(area, data, ai, vi, bi, param2_data)
local height = math.floor(drip_rand/0.1 * 5)
subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true)
elseif math.random() < 0.005 then
dfcaverns.spawn_tower_cap_vm(bi, area, data)
dfcaverns.spawn_tower_cap_vm(vi, area, data)
end
end
@ -145,7 +145,7 @@ local level_1_fungiwood_floor = function(area, data, ai, vi, bi, param2_data)
local height = math.floor(drip_rand/0.1 * 5)
subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true)
elseif math.random() < 0.005 then
dfcaverns.spawn_fungiwood_vm(bi, area, data)
dfcaverns.spawn_fungiwood_vm(vi, area, data)
end
end

View File

@ -39,7 +39,7 @@ local level_2_tower_cap_floor = function(area, data, ai, vi, bi, param2_data)
local height = math.floor(drip_rand/0.1 * 5)
subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true)
elseif math.random() < 0.005 then
dfcaverns.spawn_tower_cap_vm(bi, area, data)
dfcaverns.spawn_tower_cap_vm(vi, area, data)
end
end
@ -152,7 +152,7 @@ local level_2_fungiwood_floor = function(area, data, ai, vi, bi, param2_data)
local height = math.floor(drip_rand/0.1 * 5)
subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true)
elseif math.random() < 0.005 then
dfcaverns.spawn_fungiwood_vm(bi, area, data)
dfcaverns.spawn_fungiwood_vm(vi, area, data)
end
end
@ -178,7 +178,7 @@ local level_2_tunnel_tube_floor = function(area, data, ai, vi, bi, param2_data)
local height = math.floor(drip_rand/0.1 * 5)
subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true)
elseif math.random() < 0.05 then
dfcaverns.spawn_tunnel_tube_vm(bi, area, data)
dfcaverns.spawn_tunnel_tube_vm(vi, area, data, param2_data)
end
end
@ -204,7 +204,7 @@ local level_2_spore_tree_floor = function(area, data, ai, vi, bi, param2_data)
local height = math.floor(drip_rand/0.1 * 5)
subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true)
elseif math.random() < 0.05 then
dfcaverns.spawn_spore_tree_vm(bi, area, data)
dfcaverns.spawn_spore_tree_vm(vi, area, data)
end
end
@ -230,7 +230,7 @@ local level_2_goblin_cap_floor = function(area, data, ai, vi, bi, param2_data)
local height = math.floor(drip_rand/0.1 * 5)
subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true)
elseif math.random() < 0.025 then
dfcaverns.spawn_goblin_cap_vm(bi, area, data)
dfcaverns.spawn_goblin_cap_vm(vi, area, data)
end
end
@ -334,7 +334,7 @@ minetest.register_biome({
y_min = dfcaverns.config.level2_min,
y_max = subsea_level,
heat_point = 80,
humidity_point = 60,
humidity_point = 50,
_subterrane_ceiling_decor = level_2_moist_ceiling,
_subterrane_floor_decor = level_2_fungiwood_floor,
_subterrane_fill_node = c_air,
@ -347,7 +347,7 @@ minetest.register_biome({
y_min = subsea_level,
y_max = dfcaverns.config.level1_min,
heat_point = 80,
humidity_point = 60,
humidity_point = 50,
_subterrane_ceiling_decor = level_2_moist_ceiling,
_subterrane_floor_decor = level_2_fungiwood_floor,
_subterrane_fill_node = c_air,
@ -360,7 +360,7 @@ minetest.register_biome({
y_min = dfcaverns.config.level2_min,
y_max = subsea_level,
heat_point = 60,
humidity_point = 30,
humidity_point = 20,
_subterrane_ceiling_decor = level_2_moist_ceiling,
_subterrane_floor_decor = level_2_goblin_cap_floor,
_subterrane_fill_node = c_air,
@ -373,7 +373,7 @@ minetest.register_biome({
y_min = subsea_level,
y_max = dfcaverns.config.level1_min,
heat_point = 60,
humidity_point = 30,
humidity_point = 20,
_subterrane_ceiling_decor = level_2_moist_ceiling,
_subterrane_floor_decor = level_2_goblin_cap_floor,
_subterrane_fill_node = c_air,

View File

@ -19,11 +19,6 @@ minetest.register_node("dfcaverns:spore_tree", {
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
minetest.set_node(pos, {name="air"})
minetest.spawn_tree(pos, dfcaverns.spore_tree_model)
end,
})
minetest.register_node("dfcaverns:spore_tree_frond", {
@ -140,7 +135,7 @@ local c_spore_pod = minetest.get_content_id("dfcaverns:spore_tree_pod")
local c_tree = minetest.get_content_id("dfcaverns:spore_tree")
local c_spore_frond = minetest.get_content_id("dfcaverns:spore_tree_frond")
dfcaverns.spawn_spore_tree_vm = function(vi, data, area, height, size, iters, has_fruiting_bodies)
dfcaverns.spawn_spore_tree_vm = function(vi, area, data, height, size, iters, has_fruiting_bodies)
if height == nil then height = math.random(3,6) end
if size == nil then size = 2 end
if iters == nil then iters = 10 end
@ -152,11 +147,10 @@ dfcaverns.spawn_spore_tree_vm = function(vi, data, area, height, size, iters, ha
local has_fruiting_bodies = true
-- Trunk
data[area:index(x, y, z)] = c_tree -- Force-place lowest trunk node to replace sapling
for yy = y + 1, y + height - 1 do
for yy = y, y + height - 1 do
local vi = area:index(x, yy, z)
local node_id = data[vi]
if node_id == c_air or node_id == c_ignore or node_id == c_spore_frond then
if node_id == c_air or node_id == c_ignore or node_id == c_spore_frond or node_id == c_spore_pod then
data[vi] = c_tree
end
end
@ -213,7 +207,7 @@ dfcaverns.spawn_spore_tree = function(pos)
local area = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm:get_data()
dfcaverns.spawn_spore_tree_vm(area:indexp(pos), data, area)
dfcaverns.spawn_spore_tree_vm(area:indexp(pos), area, data)
vm:set_data(data)
vm:write_to_map()