From 7f4181be76cb2583cec921931d48bd8457023f60 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 19 Mar 2017 20:24:45 -0600 Subject: [PATCH] tweaking level2 biomes a bit --- biomes/level1.lua | 4 ++-- biomes/level2.lua | 18 +++++++++--------- trees/spore_tree.lua | 14 ++++---------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/biomes/level1.lua b/biomes/level1.lua index 09edfc4..4bf69ef 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -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 diff --git a/biomes/level2.lua b/biomes/level2.lua index d784184..b4d1d7c 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -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, diff --git a/trees/spore_tree.lua b/trees/spore_tree.lua index 9eb169c..72df52c 100644 --- a/trees/spore_tree.lua +++ b/trees/spore_tree.lua @@ -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()