1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-07-14 22:30:32 +02:00

Replace deprecated Lua function calls

This commit is contained in:
SmallJoker
2018-07-03 22:30:44 +02:00
parent 1a396c707c
commit 92a55c3985
5 changed files with 33 additions and 31 deletions

View File

@ -87,7 +87,7 @@ local function vacuum(pos, radius)
for _, object in pairs(minetest.get_objects_inside_radius(pos, math.sqrt(3) * radius)) do
local lua_entity = object:get_luaentity()
if not object:is_player() and lua_entity and lua_entity.name == "__builtin:item" then
local obj_pos = object:getpos()
local obj_pos = object:get_pos()
local minpos = vector.subtract(pos, radius)
local maxpos = vector.add(pos, radius)
if obj_pos.x >= minpos.x and obj_pos.x <= maxpos.x