Adapt to the new version of playerfactions (#48)

Enable to open an area to many factions
    Update to adapt to the new version of playerfactions mod, with its new multi-faction mode
This commit is contained in:
Kalio_42
2020-09-05 18:49:17 +02:00
committed by GitHub
parent a9c05f0e38
commit c167b30ebf
9 changed files with 91 additions and 21 deletions

View File

@ -4,7 +4,7 @@
areas = {}
areas.factions_available = minetest.global_exists("factions")
areas.factions_available = minetest.get_modpath("playerfactions") and true
areas.adminPrivs = {areas=true}
areas.startTime = os.clock()
@ -22,10 +22,12 @@ dofile(areas.modpath.."/hud.lua")
areas:load()
minetest.register_privilege("areas", {
description = "Can administer areas."
description = "Can administer areas.",
give_to_singleplayer = false
})
minetest.register_privilege("areas_high_limit", {
description = "Can protect more, bigger areas."
description = "Can protect more, bigger areas.",
give_to_singleplayer = false
})
if not minetest.registered_privileges[areas.config.self_protection_privilege] then