2using System.Collections.Generic;
6using Microsoft.Extensions.Logging;
8using Newtonsoft.Json.Converters;
15using YamlDotNet.Serialization;
143 [YamlMember(SerializeAs = typeof(
string))]
178 ArgumentNullException.ThrowIfNull(logger);
182 "No `ConfigVersion` specified, your configuration may be out of date! The current version is \"{currentVersion}\"",
187 "Your `ConfigVersion` is majorly out-of-date and may potentially cause issues running the server. Please follow migration instructions from the TGS release notes. The current config version is v{currentConfigVersion}.",
190 logger.LogWarning(
"Your `ConfigVersion` is out-of-date. Please follow migration instructions from the TGS release notes.");
193 throw new InvalidOperationException(
194 $
"{nameof(DeploymentDirectoryCopyTasksPerCore)} must be at least 1!");
195 else if (this.GetCopyDirectoryTaskThrottle() < 1)
196 throw new InvalidOperationException(
197 $
"{nameof(DeploymentDirectoryCopyTasksPerCore)} is too large for the CPU core count of {Environment.ProcessorCount} and overflows a 32-bit signed integer. Please lower the value!");
200 logger.LogWarning(
"The timeout for sending BYOND topics is very low ({ms}ms). Topic calls may fail to complete at all!",
ByondTopicTimeout);
203 logger.LogWarning($
"Config option \"{nameof(AdditionalEventScriptsDirectories)}\" contains non-rooted paths. These will be evaluated relative to each instances \"Configuration\" directory!");
General configuration options.
uint? DeploymentDirectoryCopyTasksPerCore
A limit on the amount of tasks used for asynchronous I/O when copying directories during the deployme...
const string Section
The key for the Microsoft.Extensions.Configuration.IConfigurationSection the GeneralConfiguration res...
bool OpenDreamSuppressInstallOutput
If the dotnet output of creating an OpenDream installation should be suppressed. Known to cause issue...
const string DefaultOpenDreamGitTagPrefix
The default value for OpenDreamGitTagPrefix.
GeneralConfiguration()
Initializes a new instance of the GeneralConfiguration class.
void CheckCompatibility(ILogger logger)
Validates the current ConfigVersion's compatibility and provides migration instructions.
Uri OpenDreamGitUrl
Location of a publically accessible OpenDream repository.
static readonly Version CurrentConfigVersion
The current ConfigVersion.
bool HostApiDocumentation
If the swagger documentation and UI should be made avaiable.
bool UseBasicWatchdog
If the Components.Watchdog.BasicWatchdog should be preferred.
const string DefaultOpenDreamGitUrl
The default value for OpenDreamGitUrl.
uint ShutdownTimeoutMinutes
The timeout minutes for gracefully stopping the server.
string OpenDreamGitTagPrefix
The prefix to the OpenDream semver as tags appear in the git repository.
const uint DefaultMinimumPasswordLength
The default value for ServerInformationBase.MinimumPasswordLength.
const ushort DefaultApiPort
The default value of ApiPort.
uint RestartTimeoutMinutes
The timeout minutes for restarting the server.
uint ByondTopicTimeout
The timeout in milliseconds for sending and receiving topics to/from DreamDaemon. Note that a single ...
const uint DefaultRestartTimeoutMinutes
The default value for RestartTimeoutMinutes.
const uint DefaultUserLimit
The default value for ServerInformationBase.UserLimit.
Version? ConfigVersion
The Version the file says it is.
string? GitHubAccessToken
A classic GitHub personal access token to use for bypassing rate limits on requests....
const uint DefaultByondTopicTimeout
The default value for ByondTopicTimeout.
const uint DefaultInstanceLimit
The default value for ServerInformationBase.InstanceLimit.
const uint DefaultUserGroupLimit
The default value for ServerInformationBase.UserGroupLimit.
ushort ApiPort
The port the TGS API listens on.
const uint DefaultShutdownTimeoutMinutes
The default value for ShutdownTimeoutMinutes.
List< string >? AdditionalEventScriptsDirectories
List of directories that have their contents merged with instance EventScripts directories when execu...
bool SkipAddingByondFirewallException
If the netsh.exe execution to exempt DreamDaemon from Windows firewall should be skipped.
Attribute for bringing in the master versions list from MSBuild that aren't embedded into assemblies ...
string RawConfigurationVersion
The Version string of the Configuration version built.
static MasterVersionsAttribute Instance
Return the Assembly's instance of the MasterVersionsAttribute.
SetupWizardMode
Determines if the SetupWizard will run.