Updated documentation

This commit is contained in:
Nathan Schneider
2021-12-19 16:42:34 -07:00
parent 53d2a25f42
commit a59ad22370
2 changed files with 24 additions and 12 deletions

View File

@ -1,12 +1,12 @@
--- change_modules
-- @module change_modules
--- module_template
-- @module module_template
--- (Required): data table containing name and description of the module
-- @field name "Human-readable name"
-- @field slug "Same as module class name"
-- @field desc "Description of the module"
-- @field hide "Whether this is a hidden utility module"
local change_modules = {
local module_template = {
name = "Module Human-Readable Name",
slug = "template",
desc = "Description of the module",
@ -16,7 +16,7 @@ local change_modules = {
--- (Required) Data for module
-- Variables that module uses during the course of a process
-- Can be blank
change_modules.data = {
module_template.data = {
}
--- (Required): config for module
@ -27,7 +27,7 @@ change_modules.data = {
-- Default values set in config can be overridden
-- @field field_1 ex: votes_required, default = 5
-- @field field_2 ex: voting_type, default = "majority"
change_modules.config = {
module_template.config = {
field_1 = 5
field_2 = "majority"
}
@ -39,7 +39,7 @@ change_modules.config = {
-- <li><code>self.id</code> (the process id of the module instance)</li>
-- @param result (optional) Callback if this module is embedded in other modules
-- @function initiate
function change_modules:initiate(result)
function module_template:initiate(result)
-- call interaction functions here!
-- concluding functions:
@ -51,4 +51,4 @@ function change_modules:initiate(result)
end
--- (Required) Add to module table
modpol.modules.change_modules = change_modules
modpol.modules.module_template = module_template