mirror of
https://github.com/minetest-mods/areas.git
synced 2025-07-04 00:50:34 +02:00
Merge c876179024
into bfb260d181
This commit is contained in:
2
api.lua
2
api.lua
@ -2,6 +2,7 @@
|
||||
-- Returns a list of areas that include the provided position
|
||||
function areas:getAreasAtPos(pos)
|
||||
local a = {}
|
||||
if pos then
|
||||
local px, py, pz = pos.x, pos.y, pos.z
|
||||
for id, area in pairs(self.areas) do
|
||||
local ap1, ap2 = area.pos1, area.pos2
|
||||
@ -11,6 +12,7 @@ function areas:getAreasAtPos(pos)
|
||||
a[id] = area
|
||||
end
|
||||
end
|
||||
end
|
||||
return a
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user