mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Move CVar registration to before config load on server
Fixes error on startup with the rollback system.
This commit is contained in:
@@ -166,8 +166,12 @@ namespace Robust.Server
|
||||
public bool Start(ServerOptions options, Func<ILogHandler>? logHandlerFactory = null)
|
||||
{
|
||||
Options = options;
|
||||
|
||||
_config.Initialize(true);
|
||||
|
||||
_config.LoadCVarsFromAssembly(typeof(BaseServer).Assembly); // Robust.Server
|
||||
_config.LoadCVarsFromAssembly(typeof(IConfigurationManager).Assembly); // Robust.Shared
|
||||
|
||||
if (Options.LoadConfigAndUserData)
|
||||
{
|
||||
string? path = _commandLineArgs?.ConfigFile;
|
||||
@@ -192,9 +196,6 @@ namespace Robust.Server
|
||||
}
|
||||
}
|
||||
|
||||
_config.LoadCVarsFromAssembly(typeof(BaseServer).Assembly); // Robust.Server
|
||||
_config.LoadCVarsFromAssembly(typeof(IConfigurationManager).Assembly); // Robust.Shared
|
||||
|
||||
CVarDefaultOverrides.OverrideServer(_config);
|
||||
|
||||
_config.OverrideConVars(EnvironmentVariables.GetEnvironmentCVars());
|
||||
|
||||
Reference in New Issue
Block a user