mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2024-12-25 02:00:21 +01:00
Replace deprecated methods:
- 'setting_get' with 'settings:get' - 'setting_getbool' with 'settings:get_bool'
This commit is contained in:
parent
acd570ba0d
commit
7347b05e3e
@ -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
|
||||
|
||||
|
@ -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 = {
|
||||
|
2
init.lua
2
init.lua
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user