renamed deprecated functions
This commit is contained in:
parent
a122017bf0
commit
0a74e9f8c9
10
mapgen.lua
10
mapgen.lua
@ -48,20 +48,20 @@ end
|
||||
-- if you change any of the 3 constants below, also change them in the function
|
||||
-- mg_villages.village_area_mark_inside_village_area
|
||||
mg_villages.inside_village = function(x, z, village, vnoise)
|
||||
return mg_villages.get_vn(x, z, vnoise:get2d({x = x, y = z}), village) <= 40
|
||||
return mg_villages.get_vn(x, z, vnoise:get_2d({x = x, y = z}), village) <= 40
|
||||
end
|
||||
|
||||
mg_villages.inside_village_area = function(x, z, village, vnoise)
|
||||
return mg_villages.get_vn(x, z, vnoise:get2d({x = x, y = z}), village) <= 80
|
||||
return mg_villages.get_vn(x, z, vnoise:get_2d({x = x, y = z}), village) <= 80
|
||||
end
|
||||
|
||||
mg_villages.inside_village_terrain_blend_area = function(x, z, village, vnoise)
|
||||
return mg_villages.get_vn(x, z, vnoise:get2d({x = x, y = z}), village) <= 160
|
||||
return mg_villages.get_vn(x, z, vnoise:get_2d({x = x, y = z}), village) <= 160
|
||||
end
|
||||
|
||||
|
||||
mg_villages.get_vnoise = function(x, z, village, vnoise) -- PM v
|
||||
return mg_villages.get_vn(x, z, vnoise:get2d({x = x, y = z}), village)
|
||||
return mg_villages.get_vn(x, z, vnoise:get_2d({x = x, y = z}), village)
|
||||
end -- PM ^
|
||||
|
||||
mg_villages.get_vn = function(x, z, noise, village)
|
||||
@ -593,7 +593,7 @@ mg_villages.village_area_mark_inside_village_area = function( village_area, vill
|
||||
if( not( village_area[ x ][ z ] )) then
|
||||
village_area[ x ][ z ] = { 0, 0 };
|
||||
|
||||
local n_rawnoise = village_noise:get2d({x = x, y = z}) -- create new blended terrain
|
||||
local n_rawnoise = village_noise:get_2d({x = x, y = z}) -- create new blended terrain
|
||||
for village_nr, village in ipairs(villages) do
|
||||
local vn = mg_villages.get_vn(x, z, n_rawnoise, village);
|
||||
if( village.is_single_house ) then
|
||||
|
@ -21,7 +21,7 @@ minetest.register_node("mg_villages:road", {
|
||||
|
||||
mg_villages.road_node = minetest.get_content_id( 'mg_villages:road' );
|
||||
-- do not drop snow on roads
|
||||
if( moresnow ) then
|
||||
if( minetest.get_modpath("moresnow")) then
|
||||
moresnow.snow_cover[ mg_villages.road_node ] = moresnow.c_air;
|
||||
end
|
||||
|
||||
|
@ -33,7 +33,7 @@ mg_villages.spawnplayer = function(player)
|
||||
end
|
||||
end
|
||||
end
|
||||
player:setpos(min_pos)
|
||||
player:set_pos(min_pos)
|
||||
end
|
||||
|
||||
minetest.register_on_newplayer(function(player)
|
||||
|
@ -24,7 +24,7 @@ mg_villages.villages_at_point = function(minp, noise1)
|
||||
local s = pi:next(1, 400)
|
||||
local x = pi:next(mp.x, mp.x + 79)
|
||||
local z = pi:next(mp.z, mp.z + 79)
|
||||
if s <= mg_villages.VILLAGE_CHANCE and noise1:get2d({x = x, y = z}) >= -0.3 then return {} end
|
||||
if s <= mg_villages.VILLAGE_CHANCE and noise1:get_2d({x = x, y = z}) >= -0.3 then return {} end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -32,7 +32,7 @@ mg_villages.villages_at_point = function(minp, noise1)
|
||||
if pr:next(1, 400) > mg_villages.VILLAGE_CHANCE then return {} end -- No village here
|
||||
local x = pr:next(minp.x, minp.x + 79)
|
||||
local z = pr:next(minp.z, minp.z + 79)
|
||||
if noise1:get2d({x = x, y = z}) < -0.3 then return {} end -- Deep in the ocean
|
||||
if noise1:get_2d({x = x, y = z}) < -0.3 then return {} end -- Deep in the ocean
|
||||
|
||||
-- fallback: type "nore" (that is what the mod originally came with)
|
||||
local village_type = 'nore';
|
||||
@ -604,7 +604,7 @@ end
|
||||
local function generate_walls(bpos, data, a, minp, maxp, vh, vx, vz, vs, vnoise)
|
||||
for x = minp.x, maxp.x do
|
||||
for z = minp.z, maxp.z do
|
||||
local xx = (vnoise:get2d({x=x, y=z})-2)*20+(40/(vs*vs))*((x-vx)*(x-vx)+(z-vz)*(z-vz))
|
||||
local xx = (vnoise:get_2d({x=x, y=z})-2)*20+(40/(vs*vs))*((x-vx)*(x-vx)+(z-vz)*(z-vz))
|
||||
if xx>=40 and xx <= 44 then
|
||||
bpos[#bpos+1] = {x=x, z=z, y=vh, btype="wall", bsizex=1, bsizez=1, brotate=0}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user