mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-12 11:10:28 +01:00
update deprecated functions
This commit is contained in:
parent
9e53ee9836
commit
4a40eaf2b2
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -25,7 +25,7 @@ if df_mapitems.config.snareweed_damage then
|
||||
if timer >= 1 then
|
||||
timer = timer - 1
|
||||
for _, player in pairs(minetest.get_connected_players()) do
|
||||
local player_pos = player:getpos() -- node player's feet are in this location.
|
||||
local player_pos = player:get_pos() -- node player's feet are in this location.
|
||||
local rounded_pos = vector.round(player_pos)
|
||||
local nearby_nodes = minetest.find_nodes_in_area(vector.add(rounded_pos, {x=0, y= -8, z=0}), rounded_pos, {"df_mapitems:snareweed"})
|
||||
for _, node_pos in ipairs(nearby_nodes) do
|
||||
|
@ -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
|
||||
|
@ -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.setting:get(CONFIG_FILE_PREFIX..name))
|
||||
end
|
||||
if value == nil then
|
||||
value = default
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 6662133650cb1215c385f7b00d835613b1ea5d4f
|
||||
Subproject commit 6940ae15859f671afbeb2231f90ce58914bb774f
|
Loading…
Reference in New Issue
Block a user