Pass + as command line arg to client/server to execute commands after init.

This commit is contained in:
Pieter-Jan Briers
2021-11-10 02:01:31 +01:00
parent f9ae3e1fc2
commit 8e3fa3e52d
5 changed files with 387 additions and 340 deletions

View File

@@ -83,6 +83,7 @@ namespace Robust.Server
[Dependency] private readonly IRobustMappedStringSerializer _stringSerializer = default!;
[Dependency] private readonly ILocalizationManagerInternal _loc = default!;
[Dependency] private readonly INetConfigurationManager _netCfgMan = default!;
[Dependency] private readonly IServerConsoleHost _consoleHost = default!;
private readonly Stopwatch _uptimeStopwatch = new();
@@ -337,7 +338,7 @@ namespace Robust.Server
prototypeManager.LoadDirectory(Options.PrototypeDirectory);
prototypeManager.Resync();
IoCManager.Resolve<IServerConsoleHost>().Initialize();
_consoleHost.Initialize();
_entityManager.Startup();
_mapManager.Startup();
IoCManager.Resolve<IEntityLookup>().Startup();
@@ -372,6 +373,8 @@ namespace Robust.Server
GC.Collect();
ProgramShared.RunExecCommands(_consoleHost, _commandLineArgs?.ExecCommands);
return false;
}