Moved login.lua to root and updated README

This commit is contained in:
Nathan Schneider 2021-12-18 14:02:14 -07:00
parent 721eb26777
commit bd95fcf811
3 changed files with 16 additions and 11 deletions

View File

@ -19,15 +19,20 @@ In the game, open the Modular Politics interface with the command `/modpol`.
Modular Politics can also be used independently of Minetest as a command-line tool. Currently command-line use of modpol requires a Unix-style system, but it is intended to become more fully platform independent.
The command-line version is in the `modpol` subdirectory. To interact with the interpreter on Unix systems in CLI mode, install lua or luajit and execute the following in this directory:
The command-line version is in the `modpol` subdirectory. To run the program on Unix systems in CLI mode, install lua or luajit and execute the following in this directory:
```
$ cd modpol/interactions/
$ lua [or luajit]
$ lua[jit] login.lua
```
You can also interact with the interpreter by starting it this way:
```
$ lua[jit]
> dofile("login.lua")
```
For a list of global functions and tables, use `modpol.menu()`.
In the interpreter, for a list of global functions and tables, use `modpol.menu()`.
## Storage

7
login.lua Normal file
View File

@ -0,0 +1,7 @@
dofile("modpol/modpol.lua")
print("Log in as which user?")
local username = io.read()
print()
modpol.interactions.dashboard(username)

View File

@ -1,7 +0,0 @@
dofile("../modpol.lua")
print("Log in as which user?")
local username = io.read()
print()
modpol.interactions.dashboard(username)