diff --git a/config.lua b/config.lua index 04e7257..28336ef 100644 --- a/config.lua +++ b/config.lua @@ -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, default) 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 diff --git a/init.lua b/init.lua index ece4684..4fa8b1e 100644 --- a/init.lua +++ b/init.lua @@ -287,7 +287,7 @@ radiant_damage.register_radiant_damage = function(damage_name, damage_def) timer = timer - interval for _, player in pairs(minetest.get_connected_players()) do - local player_pos = player:getpos() -- node player's feet are in this location. Add 1 to y to get chest height, more intuitive that way + local player_pos = player:get_pos() -- node player's feet are in this location. Add 1 to y to get chest height, more intuitive that way player_pos.y = player_pos.y + 1 local rounded_pos = vector.round(player_pos)