A rewrite of the node_ownership Minetest mod with many new features. https://content.minetest.net/packages/ShadowNinja/areas/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1KB

  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 = {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("areas", {
  19. description = "Can administer areas."
  20. })
  21. minetest.register_privilege("areas_high_limit", {
  22. description = "Can can more, bigger areas."
  23. })
  24. if not minetest.registered_privileges[areas.config.self_protection_privilege] then
  25. minetest.register_privilege(areas.config.self_protection_privilege, {
  26. description = "Can protect areas.",
  27. })
  28. end
  29. if minetest.settings:get_bool("log_mods") then
  30. local diffTime = os.clock() - areas.startTime
  31. minetest.log("action", "areas loaded in "..diffTime.."s.")
  32. end