swap out deprecated functions for current ones

This commit is contained in:
FaceDeer 2020-01-30 18:06:24 -07:00
parent cb8a959cc5
commit 66d191c7cd
2 changed files with 4 additions and 4 deletions

@ -7,11 +7,11 @@ local print_settingtypes = false
local function setting(stype, name, default, description) local function setting(stype, name, default, description)
local value local value
if stype == "bool" then if stype == "bool" then
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name) value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
elseif stype == "string" then elseif stype == "string" then
value = minetest.setting_get(CONFIG_FILE_PREFIX..name) value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
elseif stype == "int" or stype == "float" then elseif stype == "int" or stype == "float" then
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name)) value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
end end
if value == nil then if value == nil then
value = default value = default

@ -211,7 +211,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local chunk_lengths = {x = sidelen, y = sidelen, z = sidelen} --table of chunk edges local chunk_lengths = {x = sidelen, y = sidelen, z = sidelen} --table of chunk edges
nobj_perlin = nobj_perlin or minetest.get_perlin_map(perlin_params, chunk_lengths) nobj_perlin = nobj_perlin or minetest.get_perlin_map(perlin_params, chunk_lengths)
local nvals_perlin = nobj_perlin:get3dMap_flat(minp, nvals_perlin_buffer) -- switch to get_3d_map_flat for minetest v0.5 local nvals_perlin = nobj_perlin:get_3d_map_flat(minp, nvals_perlin_buffer)
local noise_area = VoxelArea:new{MinEdge=minp, MaxEdge=maxp} local noise_area = VoxelArea:new{MinEdge=minp, MaxEdge=maxp}
local noise_iterator = noise_area:iterp(minp, maxp) local noise_iterator = noise_area:iterp(minp, maxp)