Update for 0.4.16 settings syntax

master
Wuzzy 2017-06-20 16:54:45 +02:00
parent d0327d2b95
commit 9170c29506
1 changed files with 3 additions and 3 deletions

View File

@ -13,15 +13,15 @@ teletool.settings = {}
teletool.settings.avoid_collisions = true
teletool.settings.adjust_head = true
teletool.settings.cost_mana = 20
local avoid_collisions = minetest.setting_getbool("teletool_avoid_collisions")
local avoid_collisions = minetest.settings:get_bool("teletool_avoid_collisions")
if avoid_collisions ~= nil then
teletool.settings.avoid_collision = avoid_collisions
end
local adjust_head = minetest.setting_getbool("teletool_adjust_head")
local adjust_head = minetest.settings:get_bool("teletool_adjust_head")
if adjust_head ~= nil then
teletool.settings.adjust_head = adjust_head
end
local cost_mana = tonumber(minetest.setting_get("teletool_cost_mana"))
local cost_mana = tonumber(minetest.settings:get("teletool_cost_mana"))
if cost_mana ~= nil then
teletool.settings.cost_mana = cost_mana
end