api.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- Script for loading Minetest files
  2. -- ===================================================================
  3. -- Minetest Specific Overrides of modpol functions
  4. -- ===================================================================
  5. local localdir = minetest.get_modpath("modpol") .. "/modpol_minetest"
  6. --overrides
  7. dofile (localdir .. "/overrides/interactions.lua")
  8. --testing command for "singleplayer"
  9. function modpol.msg(text)
  10. modpol.interactions.message("singleplayer",text)
  11. end
  12. -- ===================================================================
  13. -- Minetest Chatcommands
  14. -- ===================================================================
  15. dofile (localdir .. "/chatcommands.lua")
  16. -- ===================================================================
  17. -- Minetest-specific modules
  18. -- ===================================================================
  19. dofile (localdir .. "/modules/priv_to_org.lua")
  20. -- ===================================================================
  21. -- Minetest-specific code
  22. -- ===================================================================
  23. --add members to the instance, if they are not already there.
  24. minetest.register_on_joinplayer(function(player)
  25. local p_name = player:get_player_name()
  26. modpol.instance:add_member(p_name)
  27. end)