Lua cleanup

This commit is contained in:
Luca Deri 2018-07-17 11:50:05 +02:00
parent 7f3ccec579
commit 8eb25b54b5
3 changed files with 7 additions and 6 deletions

View file

@ -592,20 +592,20 @@ end
function alertEngine(v)
local enginetable = {}
for i, t in ipairs(alert_consts.alert_consts.alert_functions_description) do
for i, t in ipairs(alert_consts.alert_functions_description) do
enginetable[#enginetable + 1] = {t[2], t[3]}
end
return(_handleArray(enginetable, v))
end
function alertEngineLabel(v)
return _handleArray(alert_consts.alert_consts.alert_functions_description, tonumber(v))
return _handleArray(alert_consts.alert_functions_description, tonumber(v))
end
function alertEngineRaw(idx)
idx = idx + 1
if idx <= #alert_consts.alert_consts.alert_functions_description then
return alert_consts.alert_consts.alert_functions_description[idx][3]
if idx <= #alert_consts.alert_functions_description then
return alert_consts.alert_functions_description[idx][3]
end
return nil
end