Added basic policy backend for modules. Also added confirmation in CLI to call a module. At that confirmation, the relevant policies are shown. Still need to create a module for changing policies and to add more configuration options to existing policies.
This commit is contained in:
@ -237,7 +237,9 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
|
||||
pname,
|
||||
module.name..":\n"..
|
||||
module.desc.."\n"..
|
||||
"Proceed?",
|
||||
modpol.interactions.get_policy_string(
|
||||
org.name, module.slug, ", ")..
|
||||
"\n".."Proceed?",
|
||||
function(input)
|
||||
if input == "Yes" then
|
||||
org:call_module(module.slug, pname)
|
||||
@ -570,10 +572,10 @@ function modpol.interactions.binary_poll_user(user, question, func)
|
||||
-- set up formspec
|
||||
local formspec = {
|
||||
"formspec_version[4]",
|
||||
"size[8,4]",
|
||||
"size[8,6]",
|
||||
"label[0.375,0.5;",minetest.formspec_escape(question), "]",
|
||||
"button[1,2.5;1,0.8;yes;Yes]",
|
||||
"button[2,2.5;1,0.8;no;No]",
|
||||
"button[1,5;1,0.8;yes;Yes]",
|
||||
"button[2,5;1,0.8;no;No]",
|
||||
--TODO can we enable text wrapping?
|
||||
--TODO we could use scroll boxes to contain the text
|
||||
}
|
||||
|
Reference in New Issue
Block a user