mirror of
https://github.com/minetest-mods/areas.git
synced 2025-02-26 16:00:20 +01:00
Restore Luanti < 5.10.0 compatibility
This commit is contained in:
parent
733e263f86
commit
01c261cbe4
6
pos.lua
6
pos.lua
@ -193,7 +193,8 @@ function areas:setPos1(name, pos)
|
||||
end
|
||||
|
||||
if old_pos then
|
||||
for object in core.objects_inside_radius(old_pos, 0.01) do
|
||||
-- TODO: use `core.objects_inside_radius` after Luanti 5.10.0 is well established.
|
||||
for _, object in ipairs(core.get_objects_inside_radius(old_pos, 0.01)) do
|
||||
local luaentity = object:get_luaentity()
|
||||
if luaentity and luaentity.name == "areas:pos1" and luaentity.player == name then
|
||||
object:remove()
|
||||
@ -216,7 +217,8 @@ function areas:setPos2(name, pos)
|
||||
end
|
||||
|
||||
if old_pos then
|
||||
for object in core.objects_inside_radius(old_pos, 0.01) do
|
||||
-- TODO: use `core.objects_inside_radius` after Luanti 5.10.0 is well established.
|
||||
for _, object in ipairs(core.get_objects_inside_radius(old_pos, 0.01)) do
|
||||
local luaentity = object:get_luaentity()
|
||||
if luaentity and luaentity.name == "areas:pos2" and luaentity.player == name then
|
||||
object:remove()
|
||||
|
Loading…
x
Reference in New Issue
Block a user