mirror of
https://github.com/mt-mods/playerfactions.git
synced 2024-11-25 16:53:47 +01:00
move settings higher up where they are expected to be
This commit is contained in:
parent
64d31e7d6b
commit
e03f8fe129
12
init.lua
12
init.lua
@ -6,6 +6,15 @@ factions = {}
|
|||||||
-- This variable "version" can be used by other mods to check the compatibility of this mod
|
-- This variable "version" can be used by other mods to check the compatibility of this mod
|
||||||
factions.version = 2
|
factions.version = 2
|
||||||
|
|
||||||
|
-- Settings
|
||||||
|
factions.mode_unique_faction = minetest.settings:get_bool(
|
||||||
|
"player_factions.mode_unique_faction", true)
|
||||||
|
factions.max_members_list = tonumber(minetest.settings:get(
|
||||||
|
"player_factions.max_members_list")) or 50
|
||||||
|
factions.priv = minetest.settings:get(
|
||||||
|
"player_factions.priv_admin") or "playerfactions_admin"
|
||||||
|
|
||||||
|
-- Privilege registration (if needed)
|
||||||
minetest.register_on_mods_loaded(function()
|
minetest.register_on_mods_loaded(function()
|
||||||
if not minetest.registered_privileges[factions.priv] then
|
if not minetest.registered_privileges[factions.priv] then
|
||||||
minetest.register_privilege(factions.priv, {
|
minetest.register_privilege(factions.priv, {
|
||||||
@ -22,9 +31,6 @@ if storage:get_string("facts") ~= "" then
|
|||||||
facts = minetest.deserialize(storage:get_string("facts"))
|
facts = minetest.deserialize(storage:get_string("facts"))
|
||||||
end
|
end
|
||||||
|
|
||||||
factions.mode_unique_faction = minetest.settings:get_bool("player_factions.mode_unique_faction", true)
|
|
||||||
factions.max_members_list = tonumber(minetest.settings:get("player_factions.max_members_list")) or 50
|
|
||||||
factions.priv = minetest.settings:get("player_factions.priv_admin") or "playerfactions_admin"
|
|
||||||
|
|
||||||
|
|
||||||
local function save_factions()
|
local function save_factions()
|
||||||
|
Loading…
Reference in New Issue
Block a user