Skip to content

Commit

Permalink
Launch arguments feature (#30)
Browse files Browse the repository at this point in the history
* Launch arguments feature

I wanted to delay round start only for the first server start but i found another bug in content... may as well commit this for anyone who needs it and when i fix it

* Review
  • Loading branch information
VasilisThePikachu authored Jun 26, 2024
1 parent 73bb7d1 commit cb287ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ private async Task StartServer(CancellationToken cancel)
"--config-file", Path.Combine(InstanceDir, "config.toml"),
"--data-dir", Path.Combine(InstanceDir, "data"),
};

// Prepare the user provided arguments
foreach (var arg in _instanceConfig.Arguments)
{
args.Add(arg);
}

var env = new List<(string, string)>();

foreach (var (envVar, value) in _instanceConfig.EnvironmentVariables)
Expand Down
5 changes: 5 additions & 0 deletions SS14.Watchdog/Configuration/InstanceConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public sealed class InstanceConfiguration
? "bin/Robust.Server.exe"
: "bin/Robust.Server";

/// <summary>
/// User arguments to pass to the server process.
/// </summary>
public List<string> Arguments { get; set; } = [];

/// <summary>
/// Make a heap dump if the server is killed due to timeout. Only supported on Linux.
/// </summary>
Expand Down

0 comments on commit cb287ca

Please sign in to comment.