Localise a var

This commit is contained in:
kay27 2022-02-18 18:23:58 +04:00
parent 11c55cce29
commit 14edda4fd0
3 changed files with 5 additions and 6 deletions

View File

@ -43,7 +43,7 @@ mcl_mapgen.register_mapgen_block(function(minp, maxp, seed)
local p1 = {x = minp.x + decrease_search_area, y = y1 + decrease_search_area, z = minp.z + decrease_search_area} local p1 = {x = minp.x + decrease_search_area, y = y1 + decrease_search_area, z = minp.z + decrease_search_area}
local p2 = {x = maxp.x - decrease_search_area, y = y2 - decrease_search_area, z = maxp.z - decrease_search_area} local p2 = {x = maxp.x - decrease_search_area, y = y2 - decrease_search_area, z = maxp.z - decrease_search_area}
pos_list = minetest_find_nodes_in_area_under_air(p1, p2, place_on) local pos_list = minetest_find_nodes_in_area_under_air(p1, p2, place_on)
local pr = PseudoRandom(seed) local pr = PseudoRandom(seed)
wart_perlin = wart_perlin or minetest_get_perlin(noise_params) wart_perlin = wart_perlin or minetest_get_perlin(noise_params)

View File

@ -304,7 +304,6 @@ local function paths(plan, minp, maxp)
if path then if path then
for _, pos in pairs(path) do for _, pos in pairs(path) do
pos.y = pos.y - 1 pos.y = pos.y - 1
local surface_mat = minetest.get_node(pos).name local surface_mat = minetest.get_node(pos).name
if surface_mat == "mcl_core:sand" or surface_mat == "mcl_core:redsand" then if surface_mat == "mcl_core:sand" or surface_mat == "mcl_core:redsand" then
minetest.swap_node(pos, {name = "mcl_core:sandstonesmooth2"}) minetest.swap_node(pos, {name = "mcl_core:sandstonesmooth2"})