summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortuedel <tuedel+github@tdl.gr>2020-07-31 22:26:58 +0200
committerGitHub <noreply@github.com>2020-07-31 22:26:58 +0200
commit01332a7ba11f10e59f42ee40203e231c31ad0079 (patch)
tree1e49f087bd71bea2b26f786c092816d66da32d6d
parentde4eeebd3b38fb1f9e9937a36e3288d0b9a66ec9 (diff)
downloadmesecons-01332a7ba11f10e59f42ee40203e231c31ad0079.tar
mesecons-01332a7ba11f10e59f42ee40203e231c31ad0079.tar.gz
mesecons-01332a7ba11f10e59f42ee40203e231c31ad0079.tar.bz2
mesecons-01332a7ba11f10e59f42ee40203e231c31ad0079.tar.xz
mesecons-01332a7ba11f10e59f42ee40203e231c31ad0079.zip
Replace deprecated getpos() calls (#522)
-rw-r--r--mesecons_commandblock/init.lua2
-rw-r--r--mesecons_detector/init.lua2
-rw-r--r--mesecons_pressureplates/init.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/mesecons_commandblock/init.lua b/mesecons_commandblock/init.lua
index 326b8ae..e41c098 100644
--- a/mesecons_commandblock/init.lua
+++ b/mesecons_commandblock/init.lua
@@ -110,7 +110,7 @@ local function resolve_commands(commands, pos)
local nearest, farthest = nil, nil
local min_distance, max_distance = math.huge, -1
for index, player in pairs(players) do
- local distance = vector.distance(pos, player:getpos())
+ local distance = vector.distance(pos, player:get_pos())
if distance < min_distance then
min_distance = distance
nearest = player:get_player_name()
diff --git a/mesecons_detector/init.lua b/mesecons_detector/init.lua
index cdc7f92..1234378 100644
--- a/mesecons_detector/init.lua
+++ b/mesecons_detector/init.lua
@@ -239,7 +239,7 @@ local node_detector_digiline = {
}
local function after_place_node_detector(pos, placer)
- local placer_pos = placer:getpos()
+ local placer_pos = placer:get_pos()
if not placer_pos then
return
end
diff --git a/mesecons_pressureplates/init.lua b/mesecons_pressureplates/init.lua
index 1a503e9..8137676 100644
--- a/mesecons_pressureplates/init.lua
+++ b/mesecons_pressureplates/init.lua
@@ -24,7 +24,7 @@ local function pp_on_timer(pos, elapsed)
mesecon.receptor_off(pos, mesecon.rules.pplate)
elseif node.name == basename .. "_off" then
for k, obj in pairs(objs) do
- local objpos = obj:getpos()
+ local objpos = obj:get_pos()
if objpos.y > pos.y-1 and objpos.y < pos.y then
minetest.set_node(pos, {name = basename .. "_on"})
mesecon.receptor_on(pos, mesecon.rules.pplate )