Merge pull request #14 from AntumDeluge/settings

Replace deprecated methods
This commit is contained in:
Vanessa Ezekowitz 2017-05-18 05:44:03 -04:00 committed by GitHub
commit 347d6ffaa4

View File

@ -13,7 +13,7 @@
local enable_colored_metal_signs = true local enable_colored_metal_signs = true
-- CWz's keyword interact mod uses this setting. -- CWz's keyword interact mod uses this setting.
local current_keyword = minetest.setting_get("interact_keyword") or "iaccept" local current_keyword = minetest.settings:get("interact_keyword") or "iaccept"
signs_lib = {} signs_lib = {}
screwdriver = screwdriver or {} screwdriver = screwdriver or {}
@ -165,7 +165,7 @@ end
-- infinite stacks -- infinite stacks
if not minetest.setting_getbool("creative_mode") then if not minetest.settings:get_bool("creative_mode") then
signs_lib.expect_infinite_stacks = false signs_lib.expect_infinite_stacks = false
else else
signs_lib.expect_infinite_stacks = true signs_lib.expect_infinite_stacks = true
@ -793,7 +793,7 @@ minetest.register_node(":locked_sign:sign_wall_locked", {
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner") local owner = meta:get_string("owner")
local pname = sender:get_player_name() or "" local pname = sender:get_player_name() or ""
if pname ~= owner and pname ~= minetest.setting_get("name") if pname ~= owner and pname ~= minetest.settings:get("name")
and not minetest.check_player_privs(pname, {sign_editor=true}) then and not minetest.check_player_privs(pname, {sign_editor=true}) then
return return
end end
@ -806,7 +806,7 @@ minetest.register_node(":locked_sign:sign_wall_locked", {
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner") local owner = meta:get_string("owner")
local pname = player:get_player_name() local pname = player:get_player_name()
return pname == owner or pname == minetest.setting_get("name") return pname == owner or pname == minetest.settings:get("name")
or minetest.check_player_privs(pname, {sign_editor=true}) or minetest.check_player_privs(pname, {sign_editor=true})
end, end,
on_rotate = signs_lib.wallmounted_rotate on_rotate = signs_lib.wallmounted_rotate
@ -1158,6 +1158,6 @@ if enable_colored_metal_signs then
}) })
end end
if minetest.setting_get("log_mods") then if minetest.settings:get("log_mods") then
minetest.log("action", S("signs loaded")) minetest.log("action", S("signs loaded"))
end end