mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-24 18:00:29 +01:00
Replace deprecated call to 'minetest.env' (#371)
This commit is contained in:
parent
bf58c77316
commit
4cc124ff9e
@ -26,7 +26,7 @@ minetest.register_tool("technic:vacuum", {
|
|||||||
end
|
end
|
||||||
local pos = user:getpos()
|
local pos = user:getpos()
|
||||||
local inv = user:get_inventory()
|
local inv = user:get_inventory()
|
||||||
for _, object in ipairs(minetest.env:get_objects_inside_radius(pos, vacuum_range)) do
|
for _, object in ipairs(minetest.get_objects_inside_radius(pos, vacuum_range)) do
|
||||||
local luaentity = object:get_luaentity()
|
local luaentity = object:get_luaentity()
|
||||||
if not object:is_player() and luaentity and luaentity.name == "__builtin:item" and luaentity.itemstring ~= "" then
|
if not object:is_player() and luaentity and luaentity.name == "__builtin:item" and luaentity.itemstring ~= "" then
|
||||||
if inv and inv:room_for_item("main", ItemStack(luaentity.itemstring)) then
|
if inv and inv:room_for_item("main", ItemStack(luaentity.itemstring)) then
|
||||||
|
Loading…
Reference in New Issue
Block a user