diff --git a/init.lua b/init.lua index eae6384..ef91f52 100644 --- a/init.lua +++ b/init.lua @@ -152,6 +152,7 @@ end --dofile(loud_walking.path .. "/recipe_list.lua") +dofile(loud_walking.path .. "/chat.lua") dofile(loud_walking.path .. "/nodes.lua") dofile(loud_walking.path .. "/deco.lua") dofile(loud_walking.path .. "/deco_caves.lua") diff --git a/mapgen.lua b/mapgen.lua index 4161d2b..24e52df 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -59,7 +59,10 @@ do for i, obiome in pairs(minetest.registered_biomes) do local biome = table.copy(obiome) - biome.special_tree_prob = 2 + biome.special_tree_prob = 5 + if biome.name == "rainforest" or biome.name == 'rainforest_swamp' then + biome.special_tree_prob = 2 + end if biome.name == "savanna" then biome.special_tree_prob = 30 end @@ -148,6 +151,7 @@ local room_size = 20 local control_off = math_floor(room_size / 4) local biome_look = {} local cave_look = {} +local tree_space = 3 local function place_schematic(pos, schem, center) @@ -220,7 +224,7 @@ local function get_biome(x, y, z) math.randomseed(seed_noise:get3d({x=px, y=py, z=pz})) local rarity = "common" - if math.random(5) > 4 then + if math.random(5) == 1 then rarity = "uncommon" end biome_look[hash] = biome_names[rarity][math.random(#biome_names[rarity])] @@ -232,8 +236,8 @@ local function get_biome(x, y, z) cave_look[hash] = cave_lining end - return 'rainforest', cave_look[hash] - --return biome_look[hash], cave_look[hash] + --return 'rainforest', cave_look[hash] + return biome_look[hash], cave_look[hash] end end @@ -281,8 +285,6 @@ local function generate(p_minp, p_maxp, seed) a = VoxelArea:new({MinEdge = emin, MaxEdge = emax}) csize = vector.add(vector.subtract(maxp, minp), 1) - vm:set_lighting({day = 0, night = 0}, minp, maxp) - local ground = half_pod.y local heights = {} cloud = minetest.get_perlin_map(cloud_noise, csize):get2dMap_flat(minp) @@ -480,7 +482,7 @@ local function generate(p_minp, p_maxp, seed) index = index + 1 last_py = nil for y = minp.y, maxp.y do - if fdz % 5 == 0 and fdx % 5 == 0 then + if fdz % tree_space == 0 and fdx % tree_space == 0 then local fdy = y % fcsize.y local py = math_floor(y / fcsize.y) local pod = fdz < pod_size.z and fdx < pod_size.x and fdy < pod_size.y @@ -495,8 +497,8 @@ local function generate(p_minp, p_maxp, seed) end if biome ~= 'control' and pod and fdy == height + ground and biomes[biome].special_tree_prob and math.random(biomes[biome].special_tree_prob) == 1 then - local rx = x + math.random(5) - 1 - local rz = z + math.random(5) - 1 + local rx = x + math.random(tree_space) - 1 + local rz = z + math.random(tree_space) - 1 local ivm = a:index(rx, y, rz) if (swamp or data[ivm + a.ystride] ~= node["default:water_source"]) and (data[ivm] == node[node_top]) then diff --git a/nodes.lua b/nodes.lua index e3a6983..c85bd74 100644 --- a/nodes.lua +++ b/nodes.lua @@ -48,6 +48,7 @@ minetest.register_node("loud_walking:control_floor", { description = "Floor", paramtype = "light", tiles = {"loud_walking_control_floor.png"}, + light_source = 16, use_texture_alpha = true, is_ground_content = false, groups = {}, @@ -69,6 +70,7 @@ minetest.register_node("loud_walking:control_wall", { paramtype = "light", tiles = {"loud_walking_control_wall.png"}, use_texture_alpha = true, + light_source = 16, is_ground_content = false, groups = {}, sounds = default.node_sound_stone_defaults(),