Replace deprecated methods:

- 'setting_get' with 'settings:get'
- 'setting_getbool' with 'settings:get_bool'
This commit is contained in:
AntumDeluge 2017-05-12 19:12:56 -07:00 committed by sofar
parent acd570ba0d
commit 7347b05e3e
4 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ Licensed under the zlib license. See LICENSE.md for more information.
moreblocks.config = {}
local function getbool_default(setting, default)
local value = minetest.setting_getbool(setting)
local value = minetest.settings:get_bool(setting)
if value == nil then
value = default
end
@ -21,7 +21,7 @@ local function setting(settingtype, name, default)
getbool_default("moreblocks." .. name, default)
else
moreblocks.config[name] =
minetest.setting_get("moreblocks." .. name) or default
minetest.settings:get("moreblocks." .. name) or default
end
end

View File

@ -454,7 +454,7 @@ minetest.register_craft({
}
})
if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
if minetest.settings:get_bool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
minetest.register_craft({
output = "moreblocks:circular_saw",
recipe = {

View File

@ -32,6 +32,6 @@ dofile(modpath .. "/redefinitions.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aliases.lua")
if minetest.setting_getbool("log_mods") then
if minetest.settings:get_bool("log_mods") then
minetest.log("action", S("[moreblocks] loaded."))
end

View File

@ -15,7 +15,7 @@ stairsplus.expect_infinite_stacks = false
stairsplus.shapes_list = {}
if not minetest.get_modpath("unified_inventory")
and minetest.setting_getbool("creative_mode") then
and minetest.settings:get_bool("creative_mode") then
stairsplus.expect_infinite_stacks = true
end