mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2024-12-26 02:30: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 = {}
|
moreblocks.config = {}
|
||||||
|
|
||||||
local function getbool_default(setting, default)
|
local function getbool_default(setting, default)
|
||||||
local value = minetest.setting_getbool(setting)
|
local value = minetest.settings:get_bool(setting)
|
||||||
if value == nil then
|
if value == nil then
|
||||||
value = default
|
value = default
|
||||||
end
|
end
|
||||||
@ -21,7 +21,7 @@ local function setting(settingtype, name, default)
|
|||||||
getbool_default("moreblocks." .. name, default)
|
getbool_default("moreblocks." .. name, default)
|
||||||
else
|
else
|
||||||
moreblocks.config[name] =
|
moreblocks.config[name] =
|
||||||
minetest.setting_get("moreblocks." .. name) or default
|
minetest.settings:get("moreblocks." .. name) or default
|
||||||
end
|
end
|
||||||
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({
|
minetest.register_craft({
|
||||||
output = "moreblocks:circular_saw",
|
output = "moreblocks:circular_saw",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
2
init.lua
2
init.lua
@ -32,6 +32,6 @@ dofile(modpath .. "/redefinitions.lua")
|
|||||||
dofile(modpath .. "/crafting.lua")
|
dofile(modpath .. "/crafting.lua")
|
||||||
dofile(modpath .. "/aliases.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."))
|
minetest.log("action", S("[moreblocks] loaded."))
|
||||||
end
|
end
|
||||||
|
@ -15,7 +15,7 @@ stairsplus.expect_infinite_stacks = false
|
|||||||
stairsplus.shapes_list = {}
|
stairsplus.shapes_list = {}
|
||||||
|
|
||||||
if not minetest.get_modpath("unified_inventory")
|
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
|
stairsplus.expect_infinite_stacks = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user