From 5527dc894525cf7405da201d5c734f7f848d20d6 Mon Sep 17 00:00:00 2001 From: Panquesito7 <51391473+Panquesito7@users.noreply.github.com> Date: Wed, 10 Jul 2019 13:26:42 -0500 Subject: [PATCH] Replace deprecated functions with newer ones (#36) This commit replaces a few deprecated calls to getpos with get_pos --- hud.lua | 2 +- init.lua | 2 +- pos.lua | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hud.lua b/hud.lua index b29152d..24f5414 100644 --- a/hud.lua +++ b/hud.lua @@ -14,7 +14,7 @@ minetest.register_globalstep(function(dtime) for _, player in pairs(minetest.get_connected_players()) do local name = player:get_player_name() - local pos = vector.round(player:getpos()) + local pos = vector.round(player:get_pos()) pos = vector.apply(pos, function(p) return math.max(math.min(p, 2147483), -2147483) end) diff --git a/init.lua b/init.lua index d1b7ebe..8179b28 100644 --- a/init.lua +++ b/init.lua @@ -32,7 +32,7 @@ if not minetest.registered_privileges[areas.config.self_protection_privilege] th }) end -if minetest.settings:get_bool("log_mod") then +if minetest.settings:get_bool("log_mods") then local diffTime = os.clock() - areas.startTime minetest.log("action", "areas loaded in "..diffTime.."s.") end diff --git a/pos.lua b/pos.lua index 36a6b78..323d55d 100644 --- a/pos.lua +++ b/pos.lua @@ -53,7 +53,7 @@ minetest.register_chatcommand("area_pos1", { elseif param == "" then local player = minetest.get_player_by_name(name) if player then - pos = player:getpos() + pos = player:get_pos() else return false, "Unable to get position." end @@ -80,7 +80,7 @@ minetest.register_chatcommand("area_pos2", { elseif param == "" then local player = minetest.get_player_by_name(name) if player then - pos = player:getpos() + pos = player:get_pos() else return false, "Unable to get position." end