mirror of
https://github.com/minetest-mods/areas.git
synced 2024-11-10 12:30:31 +01:00
commentary
This commit is contained in:
parent
6708c966ca
commit
77a30f9e05
2
api.lua
2
api.lua
|
@ -1,9 +1,11 @@
|
||||||
local protection_detectors = {}
|
local protection_detectors = {}
|
||||||
|
|
||||||
|
-- Other protection mods should be able to display their protection in the hud
|
||||||
areas.register_hud_handler = function(handler)
|
areas.register_hud_handler = function(handler)
|
||||||
protection_detectors[#protection_detectors+1] = handler
|
protection_detectors[#protection_detectors+1] = handler
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Generalized call to registered handlers to add their proeciton labels to the areas list
|
||||||
local detect_extra_protection = function(pos,res)
|
local detect_extra_protection = function(pos,res)
|
||||||
if #protection_detectors <= 0 then
|
if #protection_detectors <= 0 then
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Reference in New Issue
Block a user