Added minetest modules and am stuck on interactions and module flow

This commit is contained in:
Nathan Schneider
2021-12-18 17:53:49 -07:00
parent 51d5e404e9
commit af6e639e27
9 changed files with 156 additions and 22 deletions

View File

@ -15,12 +15,18 @@ remove_org.data = {}
--- Initiate function
-- @function initiate
function remove_org:initiate(config, result)
modpol.interactions.message_org(
self.initiator,self.org.id,
"Removing org: "..self.org.name)
self.org:delete()
modpol.interactions.dashboard(self.initiator)
-- call result function
if self.org == modpol.instance then
modpol.interactions.message(
self.initiator,
"You cannot remove the root org")
else
modpol.interactions.message_org(
self.initiator,self.org.id,
"Removing org: "..self.org.name)
self.org:delete()
modpol.interactions.dashboard(self.initiator)
-- call result function
end
if result then result() end
end