A little more cleaning up
This commit is contained in:
2
init.lua
2
init.lua
@ -14,7 +14,7 @@ modpol = {}
|
|||||||
|
|
||||||
-- get modpol_minetest's version of directory
|
-- get modpol_minetest's version of directory
|
||||||
modpol.get_script_dir = function()
|
modpol.get_script_dir = function()
|
||||||
return minetest.get_modpath("modpol").."/modpol"
|
return minetest.get_modpath("modpol").."/modpol_core"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TKTK: Implement minetest settingtypes for this... for now, the default is to use minetest mod storage.
|
-- TKTK: Implement minetest settingtypes for this... for now, the default is to use minetest mod storage.
|
||||||
|
@ -9,13 +9,7 @@
|
|||||||
|
|
||||||
local localdir = minetest.get_modpath("modpol") .. "/modpol_minetest"
|
local localdir = minetest.get_modpath("modpol") .. "/modpol_minetest"
|
||||||
|
|
||||||
--Users
|
--overrides
|
||||||
dofile (localdir .. "/overrides/users.lua")
|
|
||||||
|
|
||||||
--orgs
|
|
||||||
--dofile (localdir .. "/overrides/orgs.lua")
|
|
||||||
|
|
||||||
--interactions
|
|
||||||
dofile (localdir .. "/overrides/interactions.lua")
|
dofile (localdir .. "/overrides/interactions.lua")
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
|
|
||||||
-- ===================================================================
|
|
||||||
-- Function: modpol.list_users(org)
|
|
||||||
-- Overwrites function at /users.lua
|
|
||||||
-- Params:
|
|
||||||
-- if nil, lists instance members; if an org name, lists its members
|
|
||||||
-- Output: a table with names of players currently in the game
|
|
||||||
modpol.list_users = function(org)
|
|
||||||
local users = {}
|
|
||||||
if (org == nil) then -- no specified org; all players
|
|
||||||
for _,player in ipairs(minetest.get_connected_players()) do
|
|
||||||
local name = player:get_player_name()
|
|
||||||
table.insert(users,name)
|
|
||||||
end
|
|
||||||
else -- if an org is specified
|
|
||||||
if (modpol.orgs[org] ~= nil) then -- org exists
|
|
||||||
users = modpol.orgs[org]["members"]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return users
|
|
||||||
end
|
|
Reference in New Issue
Block a user