Browse Source

Replace deprecated getpos() calls (#522)

master
tuedel GitHub 1 week ago
parent
commit
01332a7ba1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      mesecons_commandblock/init.lua
  2. +1
    -1
      mesecons_detector/init.lua
  3. +1
    -1
      mesecons_pressureplates/init.lua

+ 1
- 1
mesecons_commandblock/init.lua 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()


+ 1
- 1
mesecons_detector/init.lua 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


+ 1
- 1
mesecons_pressureplates/init.lua 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 )


Loading…
Cancel
Save