diff --git a/config/wolfadmin.toml b/config/wolfadmin.toml index 7af5380..9025c8c 100644 --- a/config/wolfadmin.toml +++ b/config/wolfadmin.toml @@ -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] diff --git a/luamods/wolfadmin/util/settings.lua b/luamods/wolfadmin/util/settings.lua index d47e1d0..e1e7fb2 100644 --- a/luamods/wolfadmin/util/settings.lua +++ b/luamods/wolfadmin/util/settings.lua @@ -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()