init.lua 1010 B

12345678910111213141516171819202122232425262728293031
  1. --data tables definitions
  2. meseportals={}
  3. meseportals_network = {}
  4. meseportals_gui = {}
  5. meseportals.allowPrivatePortals = true
  6. meseportals.maxPlayerPortals = 14 -- Set to 0 or lower to restrict portal placement to only players with msp_unlimited privilege
  7. meseportals.close_after = 240 -- Automatically close portals after a while (default: 4 min)
  8. meseportals.default_page = "main"
  9. meseportals_gui["players"]={}
  10. meseportals["registered_players"] = {}
  11. meseportals.current_page={}
  12. minetest.register_privilege("msp_admin", {
  13. description = "Allows full control of all mese portals.",
  14. give_to_singleplayer = false,
  15. })
  16. minetest.register_privilege("msp_unlimited", {
  17. description = "Allows player to place an unlimited number of mese portals.",
  18. give_to_singleplayer = true,
  19. })
  20. modpath=minetest.get_modpath("meseportals")
  21. dofile(modpath.."/meseportal_network.lua")
  22. dofile(modpath.."/meseportal_gui.lua")
  23. dofile(modpath.."/portal_defs.lua")
  24. dofile(modpath.."/recipes.lua")
  25. dofile(modpath.."/node_behaviors.lua")