Progress on bugfixes and Minetest interfaces, but processes are still not completing

This commit is contained in:
Nathan Schneider
2021-08-04 16:58:06 -06:00
parent 3775f77c2e
commit 30e25aee3d
4 changed files with 123 additions and 42 deletions

View File

@@ -101,15 +101,15 @@ function modpol.orgs.init_instance()
local instance = temp_org()
instance.id = 1
instance.name = "instance"
instance.name = "root"
setmetatable(instance, modpol.orgs)
-- adding instance to org list
modpol.orgs.array[1] = instance
modpol.ocutil.log('Initialized the instance org')
modpol.orgs:record('Initialized the instance org', 'create_instance')
modpol.ocutil.log('Initialized the instance root org')
modpol.orgs:record('Initialized the instance root org', 'create_instance')
return instance
end
@@ -153,6 +153,7 @@ end
-- ==================================================
-- adds a new sub org to the org it is called on
-- input: name (string), user (string)
-- ex: instance:add_org('town hall')
function modpol.orgs:add_org(name, user)
if self.id == nil then
@@ -176,6 +177,7 @@ function modpol.orgs:add_org(name, user)
child_org.id = modpol.orgs.count
child_org.name = name
child_org.parent = self.id
child_org.processes = self.processes
setmetatable(child_org, modpol.orgs)