init.lua 995 B

1234567891011121314151617181920212223242526272829303132333435363738
  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.."/hud.lua")
  15. areas:load()
  16. local S = minetest.get_translator("areas")
  17. minetest.register_privilege("areas", {
  18. description = S("Can administer areas."),
  19. give_to_singleplayer = false
  20. })
  21. if not minetest.registered_privileges[areas.config.self_protection_privilege] then
  22. minetest.register_privilege(areas.config.self_protection_privilege, {
  23. description = S("Can protect areas."),
  24. })
  25. end
  26. if minetest.settings:get_bool("log_mods") then
  27. local diffTime = os.clock() - areas.startTime
  28. minetest.log("action", "areas loaded in "..diffTime.."s.")
  29. end