2013-09-02 19:16:14 -04:00
|
|
|
-- Areas mod by ShadowNinja
|
|
|
|
-- Based on node_ownership
|
2013-09-17 12:38:29 -04:00
|
|
|
-- License: LGPLv2+
|
2013-09-02 19:16:14 -04:00
|
|
|
|
|
|
|
areas = {}
|
|
|
|
|
2014-07-12 19:06:05 -04:00
|
|
|
areas.adminPrivs = {areas=true}
|
2013-09-02 19:16:14 -04: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")
|
2013-09-26 10:30:36 -04:00
|
|
|
dofile(areas.modpath.."/hud.lua")
|
2013-09-02 19:16:14 -04:00
|
|
|
|
|
|
|
areas:load()
|
|
|
|
|
2014-11-14 13:21:09 -05:00
|
|
|
minetest.register_privilege("areas", {
|
|
|
|
description = "Can administer areas."
|
|
|
|
})
|
|
|
|
minetest.register_privilege("areas_high_limit", {
|
|
|
|
description = "Can can more, bigger areas."
|
|
|
|
})
|
2013-09-02 19:16:14 -04:00
|
|
|
|
2014-11-17 21:16:59 -05:00
|
|
|
if not minetest.registered_privileges[areas.config.self_protection_privilege] then
|
|
|
|
minetest.register_privilege(areas.config.self_protection_privilege, {
|
2014-11-14 13:21:09 -05:00
|
|
|
description = "Can protect areas.",
|
2013-11-18 21:01:24 -05:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2017-05-13 01:59:30 -07:00
|
|
|
if minetest.settings:get_bool("log_mod") then
|
2013-09-02 19:16:14 -04:00
|
|
|
local diffTime = os.clock() - areas.startTime
|
2013-11-18 21:01:24 -05:00
|
|
|
minetest.log("action", "areas loaded in "..diffTime.."s.")
|
2013-09-02 19:16:14 -04:00
|
|
|
end
|
|
|
|
|