update deprecated functions
This commit is contained in:
parent
ad526001c9
commit
0079daf896
@ -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
|
||||
|
2
init.lua
2
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user