Fix some IDE messages

This commit is contained in:
Jordan Dominion
2023-12-20 20:10:10 -05:00
parent 34f142868c
commit 022b374a44
2 changed files with 13 additions and 13 deletions
@@ -130,14 +130,19 @@ namespace Tgstation.Server.Host.Components.Engine
CheckVersionValidity(version);
ArgumentNullException.ThrowIfNull(path);
var noPromptTrustedTask = SetNoPromptTrusted(path, cancellationToken);
var installDirectXTask = InstallDirectX(path, cancellationToken);
var tasks = new List<ValueTask>(3)
{
SetNoPromptTrusted(path, cancellationToken),
InstallDirectX(path, cancellationToken),
noPromptTrustedTask,
installDirectXTask,
};
if (!generalConfiguration.SkipAddingByondFirewallException)
tasks.Add(AddDreamDaemonToFirewall(version, path, cancellationToken));
{
var firewallTask = AddDreamDaemonToFirewall(version, path, cancellationToken);
tasks.Add(firewallTask);
}
return ValueTaskExtensions.WhenAll(tasks);
}
@@ -134,17 +134,12 @@ namespace Tgstation.Server.Tests.Live.Instance
cancellationToken),
ErrorCode.ModelValidationFailure);
public static int EngineInstallationTimeout(EngineVersion testVersion)
{
switch (testVersion.Engine.Value)
=> testVersion.Engine.Value switch
{
case EngineType.Byond:
return 30;
case EngineType.OpenDream:
return 500;
default:
throw new InvalidOperationException($"Unknown engine type: {testVersion.Engine.Value}");
}
}
EngineType.Byond => 30,
EngineType.OpenDream => 500,
_ => throw new InvalidOperationException($"Unknown engine type: {testVersion.Engine.Value}"),
};
int EngineInstallationTimeout() => EngineInstallationTimeout(testVersion);