mirror of
https://github.com/mt-mods/playerfactions.git
synced 2024-11-19 22:03:51 +01:00
Improve settings reading
This commit is contained in:
parent
4aed28e53e
commit
63485e4b7a
7
init.lua
7
init.lua
@ -22,12 +22,7 @@ end
|
|||||||
|
|
||||||
settings = Settings(MP.."/settings.txt")
|
settings = Settings(MP.."/settings.txt")
|
||||||
factions.mode_unique_faction = settings:get_bool("mode_unique_faction", true)
|
factions.mode_unique_faction = settings:get_bool("mode_unique_faction", true)
|
||||||
factions.max_members_list = settings:get("max_members_list")
|
factions.max_members_list = tonumber(settings:get("max_members_list")) or 50
|
||||||
if type(factions.max_members_list) == "string" then
|
|
||||||
factions.max_members_list = tonumber(factions.max_members_list)
|
|
||||||
elseif type(factions.max_members_list) == "nil" then
|
|
||||||
factions.max_members_list = 50
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user