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

@@ -16,7 +16,7 @@ consent.config = {
votes_required = 1
}
function consent:initiate(result)
function consent:initiate(config, result)
self.result = result
-- if org is empty, consent is given automatically
if self.org:get_member_count() == 0 then
@@ -39,10 +39,10 @@ function consent:callback(member)
if resp == "Yes" then
self.data.votes = self.data.votes + 1
end
if self.data.votes >= self.config.votes_required then
if self.result then self.result() end
self.org:wipe_pending_actions(self.id)
if self.result then self.result() end
end
end
)