Fixed table error on processes load

This commit is contained in:
Nathan Schneider
2021-05-10 22:56:12 -06:00
parent aa6bb06d5c
commit 592226fe5a

View File

@@ -78,12 +78,14 @@ if (modpol.orgs.array) then
if type(org) == 'table' then if type(org) == 'table' then
setmetatable(org, modpol.orgs) setmetatable(org, modpol.orgs)
-- sets process metatable on load -- sets process metatable on load
if type(org.processes) == 'table' then
for id, process in ipairs(org.processes) do for id, process in ipairs(org.processes) do
setmetatable(process, modpol.modules[process.type]) setmetatable(process, modpol.modules[process.type])
end end
end end
end end
end end
end
-- create instance if not present -- create instance if not present
modpol.instance = modpol.orgs.array[1] or modpol.orgs.init_instance() modpol.instance = modpol.orgs.array[1] or modpol.orgs.init_instance()