mirror of
https://github.com/minetest-mods/digtron.git
synced 2025-01-03 09:37:27 +01:00
Merge pull request #9 from EdwardThorsten/master
Fixed deprecated calls. Whitespaces cleanup.
This commit is contained in:
commit
19a0f193ad
@ -7,11 +7,11 @@ local print_settingtypes = false
|
||||
local function setting(stype, name, default, description)
|
||||
local value
|
||||
if stype == "bool" then
|
||||
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name)
|
||||
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name)
|
||||
elseif stype == "string" then
|
||||
value = minetest.setting_get(CONFIG_FILE_PREFIX..name)
|
||||
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
|
||||
elseif stype == "int" or stype == "float" then
|
||||
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name))
|
||||
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
|
||||
end
|
||||
if value == nil then
|
||||
value = default
|
||||
|
Loading…
Reference in New Issue
Block a user