Added minetest modules and am stuck on interactions and module flow
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
Reference in New Issue
Block a user