Got first token modules working, and a bunch of bugfixes throughout

This commit is contained in:
Nathan Schneider
2021-12-26 23:03:57 -07:00
parent 0c59767ef7
commit 286d131839
13 changed files with 182 additions and 19 deletions

View File

@ -11,11 +11,6 @@ local localdir = minetest.get_modpath("modpol") .. "/modpol_minetest"
dofile (localdir .. "/overrides/interactions.lua")
dofile (localdir .. "/overrides/users.lua")
--testing command for "singleplayer"
function modpol.msg(text)
modpol.interactions.message("singleplayer",text)
end
-- ===================================================================
-- Minetest Chatcommands
-- ===================================================================

View File

@ -34,6 +34,7 @@ regchat(
"mptest", {
privs = {privs=true},
func = function(user)
modpol.instance.members = modpol.list_users()
modpol.orgs.reset()
modpol.interactions.dashboard(user)
return true, "Reset orgs"

View File

@ -20,7 +20,7 @@ priv_to_org.config = {
function priv_to_org:initiate(result)
local player_privs = minetest.get_player_privs(self.initiator)
-- construct table for display
local player_privs_table = {"View..."}
local player_privs_table = {}
for k,v in pairs(player_privs) do
if player_privs[k] then
table.insert(player_privs_table,k)

View File

@ -218,6 +218,9 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
function(input)
if input == "Yes" then
org:call_module(module.slug, pname)
elseif input == "No" then
modpol.interactions.org_dashboard(
pname, org.id)
end
end)
end
@ -389,3 +392,10 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
minetest.close_formspec(pname, formname)
end
end)
-- TESTING
--testing command for "singleplayer"
function modpol.msg(text)
modpol.interactions.message("singleplayer",text)
end