Adds world parameter to change the config directory (#39073)

This commit is contained in:
Jordan Brown
2018-07-13 20:04:15 -04:00
committed by yogstation13-bot
parent c17aa9d033
commit 2cf29eeb3b
3 changed files with 6 additions and 2 deletions

View File

@@ -440,6 +440,8 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
#define OVERRIDE_LOG_DIRECTORY_PARAMETER "log-directory"
//Prevent the master controller from starting automatically, overrides TEST_RUN_PARAMETER
#define NO_INIT_PARAMETER "no-init"
//Force the config directory to be something other than "config"
#define OVERRIDE_CONFIG_DIRECTORY_PARAMETER "config-directory"
#define EGG_LAYING_MESSAGES list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")

View File

@@ -20,7 +20,9 @@
var/motd
/datum/controller/configuration/proc/Load()
/datum/controller/configuration/proc/Load(directory)
if(directory)
src.directory = directory
if(entries)
CRASH("[THIS_PROC_TYPE_WEIRD] called more than once!")
InitEntries()

View File

@@ -21,7 +21,7 @@ GLOBAL_PROTECT(security_mode)
GLOB.revdata = new
config.Load()
config.Load(params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER])
//SetupLogs depends on the RoundID, so lets check
//DB schema and set RoundID if we can