init.lua 1.0 KB

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