2using System.Collections.Generic;
 
    3using System.Globalization;
 
    4using System.Threading.Tasks;
 
   54            return securityLevel 
switch 
   56                DreamDaemonSecurity.Safe => 
"safe",
 
   57                DreamDaemonSecurity.Trusted => 
"trusted",
 
   58                DreamDaemonSecurity.Ultrasafe => 
"ultrasafe",
 
   59                _ => 
throw new ArgumentOutOfRangeException(nameof(securityLevel), securityLevel, String.Format(CultureInfo.InvariantCulture, 
"Bad DreamDaemon security level: {0}", securityLevel)),
 
 
   70            return visibility 
switch 
   72                DreamDaemonVisibility.Public => 
"public",
 
   73                DreamDaemonVisibility.Private => 
"private",
 
   74                DreamDaemonVisibility.Invisible => 
"invisible",
 
   75                _ => 
throw new ArgumentOutOfRangeException(nameof(visibility), visibility, String.Format(CultureInfo.InvariantCulture, 
"Bad DreamDaemon visibility level: {0}", visibility)),
 
 
   91            Task installationTask,
 
   93            string dreamDaemonPath,
 
   94            string dreamMakerPath,
 
   97            : base(installationIOManager)
 
   99            InstallationTask = installationTask ?? 
throw new ArgumentNullException(nameof(installationTask));
 
  100            ArgumentNullException.ThrowIfNull(version);
 
  103                throw new ArgumentException($
"Invalid EngineType: {version.Engine}", nameof(version));
 
  105            Version = version ?? 
throw new ArgumentNullException(nameof(version));
 
  106            ServerExePath = dreamDaemonPath ?? 
throw new ArgumentNullException(nameof(dreamDaemonPath));
 
  107            CompilerExePath = dreamMakerPath ?? 
throw new ArgumentNullException(nameof(dreamMakerPath));
 
 
  116            IReadOnlyDictionary<string, string>? parameters,
 
  118            string accessIdentifier,
 
  121            ArgumentNullException.ThrowIfNull(dmbProvider);
 
  122            ArgumentNullException.ThrowIfNull(launchParameters);
 
  123            ArgumentNullException.ThrowIfNull(accessIdentifier);
 
  125            var encodedParameters = EncodeParameters(parameters, launchParameters);
 
  126            var parametersString = !String.IsNullOrEmpty(encodedParameters)
 
  127                ? $
" -params \"{encodedParameters}\"" 
  131            var arguments = String.Format(
 
  132                CultureInfo.InvariantCulture,
 
  133                "\"{0}\" -port {1} -ports 1-65535 {2}-close -verbose -{3} -{4}{5}{6}{7}{8}",
 
  135                launchParameters.
Port!.Value,
 
  142                    ? $
" -logself -log {logFilePath}" 
  148                    ? $
" -map-threads {launchParameters.MapThreads.Value}" 
 
  157            if (String.IsNullOrWhiteSpace(additionalArguments))
 
  158                additionalArguments = String.Empty;
 
  160                additionalArguments = $
"{additionalArguments.Trim()} ";
 
  162            return $
"-clean {additionalArguments}\"{dmePath ?? throw new ArgumentNullException(nameof(dmePath))}\"";
 
 
 
 
Information about an engine installation.
 
EngineType? Engine
The EngineType.
 
Launch settings for DreamDaemon.
 
ushort? Port
The port DreamDaemon uses. This should be publically accessible.
 
DreamDaemonVisibility? Visibility
The DreamDaemonVisibility level of DreamDaemon. No-op for EngineType.OpenDream.
 
bool? AllowWebClient
If the BYOND web client can be used to connect to the game server. No-op for EngineType....
 
bool? StartProfiler
If -profile is passed in on the DreamDaemon command line. No-op for EngineType.OpenDream.
 
DreamDaemonSecurity? SecurityLevel
The DreamDaemonSecurity level of DreamDaemon. No-op for EngineType.OpenDream.
 
uint? MapThreads
If DreamDaemon supports it, the value added as the -map-threads parameter. 0 uses the default BYOND v...
 
Implementation of IEngineInstallation for EngineType.Byond.
 
readonly bool supportsMapThreads
If map threads are supported by the Version.
 
override bool PromptsForNetworkAccess
 
static string VisibilityWord(DreamDaemonVisibility visibility)
Change a given visibility  into the appropriate DreamDaemon command line word.
 
override string FormatServerArguments(IDmbProvider dmbProvider, IReadOnlyDictionary< string, string >? parameters, DreamDaemonLaunchParameters launchParameters, string accessIdentifier, string? logFilePath)
 
static string SecurityWord(DreamDaemonSecurity securityLevel)
Change a given securityLevel  into the appropriate DreamDaemon command line word.
 
override string ServerExePath
 
override string FormatCompilerArguments(string dmePath, string? additionalArguments)
 
override Task InstallationTask
 
override bool UseDotnetDump
 
ByondInstallation(IIOManager installationIOManager, Task installationTask, EngineVersion version, string dreamDaemonPath, string dreamMakerPath, bool supportsCli, bool supportsMapThreads)
Initializes a new instance of the ByondInstallation class.
 
override bool HasStandardOutput
 
override EngineVersion Version
 
override bool PreferFileLogging
 
override string CompilerExePath
 
Provides absolute paths to the latest compiled .dmbs.
 
string DmbName
The file name of the .dmb.
 
Interface for using filesystems.
 
DreamDaemonVisibility
The visibility setting for DreamDaemon.
 
DreamDaemonSecurity
DreamDaemon's security level.
 
EngineType
The type of engine the codebase is using.