Replace deprecated getpos() calls (#522)

This commit is contained in:
tuedel 2020-07-31 22:26:58 +02:00 committed by GitHub
parent de4eeebd3b
commit 01332a7ba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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

View File

@ -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 )