Major refactoring (big thanks to OldCoder) enabling CLI and local storage and cleaner modpol/MT split

This commit is contained in:
Nathan Schneider
2021-01-28 23:22:06 -07:00
parent c8ca1d3d51
commit c927b4d9fc
16 changed files with 1833 additions and 260 deletions

View File

@ -1,23 +1,57 @@
# modpol: Modular Politics for Minetest
# modpol: Modular Politics Prototype for Minetest
This is a mod for [Minetest](https://minetest.net) that provides an API for diverse governance mechanisms. It seeks to implement the [Modular Politics](https://metagov.org/modpol) proposal.
This is a mod for [Minetest](https://minetest.net) that enables diverse governance mechanisms. It seeks to implement the [Modular Politics](https://metagov.org/modpol) proposal. Ideally, in the future, it
will be possible to use this framework to simulate governance in a
number of platform contexts.
This mod produces an API that can serve as a dependency for other mods that add specific governance functionalities.
This mod produces an API that can serve as a dependency for other mods that add specific governance functionalities.
Currently modpol requires a Unix-style system. But it is intended to become more fully platform independent. Here, only the init.lua (and the optional storage-mod_storage.lua) files are Minetest-specific.
For background information and project roadmap, see [the wiki](https://gitlab.com/medlabboulder/modpol/-/wikis/home).
## Functioning commands
## Command line
Most of these commands will later be buried under other commands that do more privilege checking. These are mainly for testing purposes.
To interact with the interpreter on Unix systems in CLI mode, install
lua or luajit and execute the following command in this directory:
* `/neworg [orgname]` - Create a new org
```
$ lua
> dofile("modpol.lua")
```
## Minetest
To use this in Minetest, simply install it as a Minetest mod. Minetest
will load init.lua. See the source code for information about chat
commands which can then be used.
Most of these commands will later be buried under other commands that
do more privilege checking. These are mainly for testing purposes.
* `/addorg [orgname]` - Create a new org
* `/listorgs` - Lists the orgs (and their members) currently in existence
* `/rmorgs` - Reset orgs to just "instance" with all online players
* `/listplayers` - Lists all the players currently in the game
* `/joinorg [orgname]` - Adds the user to the specified org
* `/listmembers [orgname]` - Lists the players currently in the specified org
* `/pollself [question]` - Asks the player a yes/no/abstain question
---
Initiated by [Nathan Schneider](https://nathanschneider.info) of the [Media Enterprise Design Lab](https://colorado.edu/lab/medlab) at the University of Colorado Boulder, as part of the [Metagovernance Project](https://metagov.org), in collaboration with the Minetest community—see the initial [forum post](https://forum.minetest.net/viewtopic.php?f=47&t=26037). Contributions welcome.
## Storage
By default, a data directory named "data" will be created in this directory. "/data" will contain a log file and serialized program data files.
Another storage method may be chosen in modpol.lua. A StorageRef-based method for Minetest 5.* is included: storage-mod_storage.lua.
## Authorship
Initiated by [Nathan Schneider](https://nathanschneider.info) of the [Media Enterprise Design Lab](https://colorado.edu/lab/medlab) at the University of Colorado Boulder, as part of the [Metagovernance Project](https://metagov.org). Based on the paper "[Modular Politics: Toward a Governance Layer for Online Communities](https://metagov.org/modpol)."
We'd love to have more contributors, particularly from the Minetest community! Please join the conversation in the [Issues](https://gitlab.com/medlabboulder/modpol/-/issues) or the [Minetest.net forum](https://forum.minetest.net/viewtopic.php?f=47&t=26037).
Thanks to contributors: Robert Kiraly [[OldCoder](https://github.com/oldcoder/)] (ocutils.lua, storage-local.lua, project refactoring)
## Licenses
* [Project](LICENSE.mt): MIT-based Hippocratic License
* [Lua Serpent Serializer](serpent/LICENSE.txt): MIT