2013-09-03 01:16:14 +02:00
|
|
|
-- Areas mod by ShadowNinja
|
|
|
|
-- Based on node_ownership
|
2013-09-17 18:38:29 +02:00
|
|
|
-- License: LGPLv2+
|
2013-09-03 01:16:14 +02:00
|
|
|
|
|
|
|
areas = {}
|
|
|
|
|
|
|
|
areas.startTime = os.clock()
|
|
|
|
|
|
|
|
areas.modpath = minetest.get_modpath("areas")
|
|
|
|
dofile(areas.modpath.."/settings.lua")
|
|
|
|
dofile(areas.modpath.."/api.lua")
|
|
|
|
dofile(areas.modpath.."/internal.lua")
|
|
|
|
dofile(areas.modpath.."/chatcommands.lua")
|
|
|
|
dofile(areas.modpath.."/pos.lua")
|
|
|
|
dofile(areas.modpath.."/interact.lua")
|
|
|
|
dofile(areas.modpath.."/legacy.lua")
|
2013-09-26 16:30:36 +02:00
|
|
|
dofile(areas.modpath.."/hud.lua")
|
2013-09-03 01:16:14 +02:00
|
|
|
|
|
|
|
areas:load()
|
|
|
|
|
|
|
|
minetest.register_privilege("areas", {description = "Can administer areas"})
|
|
|
|
|
|
|
|
if not minetest.registered_privileges[areas.self_protection_privilege] then
|
2013-11-19 03:01:24 +01:00
|
|
|
minetest.register_privilege(areas.self_protection_privilege, {
|
|
|
|
description = "Can protect areas",
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
for _, area in pairs(areas.areas) do
|
|
|
|
area.id = nil
|
2013-09-03 01:16:14 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
if minetest.setting_getbool("log_mod") then
|
|
|
|
local diffTime = os.clock() - areas.startTime
|
2013-11-19 03:01:24 +01:00
|
|
|
minetest.log("action", "areas loaded in "..diffTime.."s.")
|
2013-09-03 01:16:14 +02:00
|
|
|
end
|
|
|
|
|