api.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --call all files in this directory
  2. -- ===================================================================
  3. -- Minetest Specific Overrides of modpol functions
  4. -- ===================================================================
  5. local localdir = minetest.get_modpath("modpol") .. "/modpol_minetest"
  6. --Users
  7. dofile (localdir .. "/overrides/users.lua")
  8. --orgs
  9. --dofile (localdir .. "/overrides/orgs.lua")
  10. --interactions
  11. dofile (localdir .. "/overrides/interactions.lua")
  12. -- ===================================================================
  13. -- Minetest Chatcommands
  14. -- ===================================================================
  15. dofile (localdir .. "/chatcommands.lua")
  16. -- ===================================================================
  17. -- Minetest Specific code
  18. -- ===================================================================
  19. --add members to the instance, if they are not already there.
  20. minetest.register_on_joinplayer(function(player)
  21. local p_name = player:get_player_name()
  22. modpol.instance:add_member(p_name)
  23. end)