From 5349738fc6b5501b483906573a89488341c56630 Mon Sep 17 00:00:00 2001 From: "Tai @ Flex" Date: Mon, 19 Dec 2016 16:40:42 +0000 Subject: [PATCH] stylistic fixes etc --- api.lua | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/api.lua b/api.lua index 198979a..102716d 100644 --- a/api.lua +++ b/api.lua @@ -6,24 +6,19 @@ areas.registerHudHandler = function(handler) end -- Generalized call to registered handlers to add their proeciton labels to the areas list -local detect_extra_protection = function(pos, area_list) +function areas:getRegisteredProtections(pos) + local area_list = {} if #protection_detectors <= 0 then return area_list end - for idx=1,#protection_detectors do + for idx=1, #protection_detectors do local func = protection_detectors[idx] - area_list = func(pos,area_list) + area_list = func(pos, area_list) end return area_list end -function areas:getRegisteredProtections(pos) - local res = {} - res = detect_extra_protection(pos, res) - return res -end - --- Returns a list of areas that include the provided position. function areas:getAreasAtPos(pos) local res = {}