replace deprecated setting methods

This commit is contained in:
DS-Minetest 2017-07-05 18:52:46 +02:00
parent a7da195aa1
commit e8a666f34e
5 changed files with 13 additions and 13 deletions

View File

@ -1,5 +1,5 @@
-- minetest time speed
local time_speed = tonumber(minetest.setting_get("time_speed"))
local time_speed = tonumber(minetest.settings:get("time_speed"))
if not time_speed then
time_speed = 1
else

View File

@ -291,7 +291,7 @@ local guide_size = {x=40, y=10, cx=0.2, cy=0.2}
local formspec_offset = {x=0.25, y=0.50}
local font_size
if minetest.is_singleplayer() then
font_size = tonumber(minetest.setting_get("font_size")) or 13
font_size = tonumber(minetest.settings:get("font_size")) or 13
else
font_size = 13
end

View File

@ -142,7 +142,7 @@ local function do_ws_func(depth, a, x)
return SIZE * y / math.pi
end
local chunksize = minetest.setting_get("chunksize") or 5
local chunksize = minetest.settings:get("chunksize") or 5
local ws_lists = {}
local function get_ws_list(a,x)
ws_lists[a] = ws_lists[a] or {}

View File

@ -7,7 +7,7 @@ local function table_contains(t, v)
return false
end
local creative = minetest.setting_getbool("creative_mode")
local creative = minetest.settings:get_bool("creative_mode")
local function throw_pearl(item, player)
local playerpos = player:getpos()
playerpos.y = playerpos.y+1.625

View File

@ -2,7 +2,7 @@
-- kills the player if he uses PilzAdam portal
local portal_target = nether.buildings+1
local nether_prisons = minetest.setting_getbool("enable_damage")
local nether_prisons = minetest.settings:get_bool("enable_damage")
local obsidian_portal_kills = nether_prisons and true
local mclike_portal = false
@ -549,7 +549,7 @@ minetest.after(0.1, function()
player:get_player_name(),
"Warning: If you are in the nether you may not be able to find the way out!"
)
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode") then
stack:take_item()
end
end