mirror of
https://github.com/minetest-mods/areas.git
synced 2024-12-26 18:50:41 +01:00
restore code style, adjust further style
This commit is contained in:
parent
bb10d0c9f3
commit
9fc3583509
7
api.lua
7
api.lua
@ -1,7 +1,7 @@
|
|||||||
local protection_detectors = {}
|
local protection_detectors = {}
|
||||||
|
|
||||||
-- Other protection mods should be able to display their protection in the hud
|
-- Other protection mods should be able to display their protection in the hud
|
||||||
areas.register_hud_handler = function(handler)
|
areas.registerHudHandler = function(handler)
|
||||||
protection_detectors[#protection_detectors + 1] = handler
|
protection_detectors[#protection_detectors + 1] = handler
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ end
|
|||||||
|
|
||||||
function areas:getRegisteredProtections(pos)
|
function areas:getRegisteredProtections(pos)
|
||||||
local res = {}
|
local res = {}
|
||||||
res = detect_extra_protection(pos,res)
|
res = detect_extra_protection(pos, res)
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -41,8 +41,7 @@ function areas:getAreasAtPos(pos)
|
|||||||
if
|
if
|
||||||
(px >= ap1.x and px <= ap2.x) and
|
(px >= ap1.x and px <= ap2.x) and
|
||||||
(py >= ap1.y and py <= ap2.y) and
|
(py >= ap1.y and py <= ap2.y) and
|
||||||
(pz >= ap1.z and pz <= ap2.z)
|
(pz >= ap1.z and pz <= ap2.z) then
|
||||||
then
|
|
||||||
res[id] = area
|
res[id] = area
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user