From 01332a7ba11f10e59f42ee40203e231c31ad0079 Mon Sep 17 00:00:00 2001 From: tuedel Date: Fri, 31 Jul 2020 22:26:58 +0200 Subject: [PATCH] Replace deprecated getpos() calls (#522) --- mesecons_commandblock/init.lua | 2 +- mesecons_detector/init.lua | 2 +- mesecons_pressureplates/init.lua | 2 +- 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 )