mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-10 06:41:53 +00:00
Added autodetection of standalone mode (refs #61)
This commit is contained in:
parent
de27a4172b
commit
27986cbf7a
2 changed files with 15 additions and 1 deletions
|
@ -4,8 +4,9 @@
|
|||
# http://dev.timosmit.com/wolfadmin/configuration.html
|
||||
|
||||
[main]
|
||||
# uncomment if you need to override these settings
|
||||
# os = "unix"
|
||||
standalone = 1
|
||||
# standalone = 1
|
||||
debug = 0
|
||||
|
||||
[db]
|
||||
|
|
|
@ -174,6 +174,19 @@ function settings.load()
|
|||
if not (platform == "unix" or platform == "windows") then
|
||||
settings.set("sv_os", settings.determineOS())
|
||||
end
|
||||
|
||||
local mod = et.trap_Cvar_Get("fs_game")
|
||||
local shrubbot = et.trap_Cvar_Get("g_shrubbot") -- etpub, nq
|
||||
local dbDir = et.trap_Cvar_Get("g_dbDirectory") -- silent
|
||||
if mod == "legacy" or mod == "etpro" then
|
||||
settings.set("g_standalone", 1)
|
||||
elseif (not shrubbot or shrubbot == "") and (not dbDir or dbDir == "") then
|
||||
settings.set("g_standalone", 1)
|
||||
else
|
||||
settings.set("g_standalone", 0)
|
||||
end
|
||||
|
||||
outputDebug("WolfAdmin running in "..(settings.get("g_standalone") == 1 and "standalone" or "add-on").." mode.")
|
||||
end
|
||||
|
||||
function settings.determineOS()
|
||||
|
|
Loading…
Reference in a new issue