init.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. -- Areas mod by ShadowNinja
  2. -- Based on node_ownership
  3. -- License: LGPLv2+
  4. areas = {}
  5. areas.factions_available = minetest.global_exists("factions")
  6. areas.adminPrivs = {admin_areas=true}
  7. areas.startTime = os.clock()
  8. areas.modpath = minetest.get_modpath("areas")
  9. dofile(areas.modpath.."/settings.lua")
  10. dofile(areas.modpath.."/api.lua")
  11. dofile(areas.modpath.."/internal.lua")
  12. dofile(areas.modpath.."/chatcommands.lua")
  13. dofile(areas.modpath.."/pos.lua")
  14. dofile(areas.modpath.."/interact.lua")
  15. dofile(areas.modpath.."/legacy.lua")
  16. dofile(areas.modpath.."/hud.lua")
  17. areas:load()
  18. minetest.register_privilege("admin_areas", {
  19. description = "Can administer areas.",
  20. give_to_singleplayer = false
  21. })
  22. minetest.register_privilege("areas_high_limit", {
  23. description = "Can can more, bigger areas."
  24. })
  25. if not minetest.registered_privileges[areas.config.self_protection_privilege] then
  26. minetest.register_privilege(areas.config.self_protection_privilege, {
  27. description = "Can protect areas.",
  28. })
  29. end
  30. if minetest.settings:get_bool("log_mods") then
  31. local diffTime = os.clock() - areas.startTime
  32. minetest.log("action", "areas loaded in "..diffTime.."s.")
  33. end