areas/init.lua

49 lines
1.4 KiB
Lua
Raw Permalink Normal View History

2013-09-03 01:16:14 +02:00
-- Areas mod by ShadowNinja
-- Based on node_ownership
-- License: LGPLv2+
2013-09-03 01:16:14 +02:00
areas = {}
areas.factions_available = minetest.get_modpath("playerfactions") and true
areas.adminPrivs = {areas=true}
2013-09-03 01:16:14 +02:00
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")
dofile(areas.modpath.."/hud.lua")
2013-09-03 01:16:14 +02:00
areas:load()
local S = minetest.get_translator("areas")
minetest.register_privilege("areas", {
description = S("Can administer areas."),
give_to_singleplayer = false
})
minetest.register_privilege("areas_high_limit", {
description = S("Can protect more, bigger areas."),
give_to_singleplayer = false
})
-- Mega_builder privilege -- MFF
minetest.register_privilege("megabuilder", {
description = "Can protect an infinite amount of areas."
})
2013-09-03 01:16:14 +02:00
if not minetest.registered_privileges[areas.config.self_protection_privilege] then
minetest.register_privilege(areas.config.self_protection_privilege, {
description = S("Can protect areas."),
})
end
if minetest.settings:get_bool("log_mods") then
2013-09-03 01:16:14 +02:00
local diffTime = os.clock() - areas.startTime
minetest.log("action", "areas loaded in "..diffTime.."s.")
2013-09-03 01:16:14 +02:00
end