|
@@ -71,9 +71,17 @@ dofile (topdir .. "/api.lua")
|
|
|
|
|
|
-- ===================================================================
|
|
-- ===================================================================
|
|
-- Final checks
|
|
-- Final checks
|
|
-for id, org in ipairs(modpol.orgs.array) do
|
|
|
|
- if type(org) == 'table' then
|
|
|
|
- setmetatable(org, modpol.orgs)
|
|
|
|
|
|
+
|
|
|
|
+-- sets org metatable on load
|
|
|
|
+if (modpol.orgs.array) then
|
|
|
|
+ for id, org in ipairs(modpol.orgs.array) do
|
|
|
|
+ if type(org) == 'table' then
|
|
|
|
+ setmetatable(org, modpol.orgs)
|
|
|
|
+ end
|
|
|
|
+ -- sets process metatable on load
|
|
|
|
+ for id, process in ipairs(org.processes) do
|
|
|
|
+ setmetatable(process, org.modules[process.type])
|
|
|
|
+ end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
|