Replace getpos() with get_pos()
This commit is contained in:
parent
1f1361d179
commit
e789801662
58 changed files with 105 additions and 105 deletions
|
@ -41,7 +41,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()
|
||||
|
|
|
@ -304,7 +304,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack)
|
|||
for _, obj in ipairs(objects_to_move) do
|
||||
local entity = obj:get_luaentity()
|
||||
if not entity or not mesecon.is_mvps_unmov(entity.name) then
|
||||
local np = vector.add(obj:getpos(), dir)
|
||||
local np = vector.add(obj:get_pos(), dir)
|
||||
|
||||
--move only if destination is not solid
|
||||
local nn = minetest.get_node(np)
|
||||
|
|
|
@ -56,7 +56,7 @@ local function pp_on_timer(pos, elapsed)
|
|||
end
|
||||
elseif node.name == basename .. "_off" then
|
||||
for k, obj in pairs(objs) do
|
||||
local objpos = obj:getpos()
|
||||
local objpos = obj:get_pos()
|
||||
if obj_does_activate(obj, activated_by) then
|
||||
if objpos.y > pos.y-1 and objpos.y < pos.y then
|
||||
minetest.set_node(pos, {name = basename .. "_on"})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue