diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-07-06 22:26:09 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-07-06 22:26:09 -0400 |
commit | d51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4 (patch) | |
tree | ec19cdd7567125e47cfd49c7c044fc09f09f6b2f /src/SMAPI/Framework/Models/SConfig.cs | |
parent | 8e9237bdd7ec179975c9be5e28c811b42007e707 (diff) | |
parent | bcb9e25d8666d2c1384515063ffbf987c36b8b0e (diff) | |
download | SMAPI-d51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4.tar.gz SMAPI-d51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4.tar.bz2 SMAPI-d51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Models/SConfig.cs')
-rw-r--r-- | src/SMAPI/Framework/Models/SConfig.cs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/SMAPI/Framework/Models/SConfig.cs b/src/SMAPI/Framework/Models/SConfig.cs index baef6144..9444c046 100644 --- a/src/SMAPI/Framework/Models/SConfig.cs +++ b/src/SMAPI/Framework/Models/SConfig.cs @@ -38,45 +38,49 @@ namespace StardewModdingAPI.Framework.Models /******** ** Accessors ********/ + // + // Note: properties must be writable to support merging config.user.json into it. + // + /// <summary>Whether to enable development features.</summary> - public bool DeveloperMode { get; private set; } + public bool DeveloperMode { get; set; } /// <summary>Whether to check for newer versions of SMAPI and mods on startup.</summary> - public bool CheckForUpdates { get; } + public bool CheckForUpdates { get; set; } /// <summary>Whether to add a section to the 'mod issues' list for mods which which directly use potentially sensitive .NET APIs like file or shell access.</summary> - public bool ParanoidWarnings { get; } + public bool ParanoidWarnings { get; set; } /// <summary>Whether to show beta versions as valid updates.</summary> - public bool UseBetaChannel { get; } + public bool UseBetaChannel { get; set; } /// <summary>SMAPI's GitHub project name, used to perform update checks.</summary> - public string GitHubProjectName { get; } + public string GitHubProjectName { get; set; } /// <summary>The base URL for SMAPI's web API, used to perform update checks.</summary> - public string WebApiBaseUrl { get; } + public string WebApiBaseUrl { get; set; } /// <summary>The log contexts for which to enable verbose logging, which may show a lot more information to simplify troubleshooting.</summary> /// <remarks>The possible values are "*" (everything is verbose), "SMAPI", (SMAPI itself), or mod IDs.</remarks> - public HashSet<string> VerboseLogging { get; } + public HashSet<string> VerboseLogging { get; set; } /// <summary>Whether SMAPI should rewrite mods for compatibility.</summary> - public bool RewriteMods { get; } + public bool RewriteMods { get; set; } /// <summary>Whether to use raw image data when possible, instead of initializing an XNA Texture2D instance through the GPU.</summary> - public bool UseRawImageLoading { get; } + public bool UseRawImageLoading { get; set; } /// <summary>Whether to make SMAPI file APIs case-insensitive, even on Linux.</summary> - public bool UseCaseInsensitivePaths { get; } + public bool UseCaseInsensitivePaths { get; set; } /// <summary>Whether SMAPI should log network traffic. Best combined with <see cref="VerboseLogging"/>, which includes network metadata.</summary> - public bool LogNetworkTraffic { get; } + public bool LogNetworkTraffic { get; set; } /// <summary>The colors to use for text written to the SMAPI console.</summary> - public ColorSchemeConfig ConsoleColors { get; } + public ColorSchemeConfig ConsoleColors { get; set; } /// <summary>The mod IDs SMAPI should ignore when performing update checks or validating update keys.</summary> - public HashSet<string> SuppressUpdateChecks { get; } + public HashSet<string> SuppressUpdateChecks { get; set; } /******** @@ -96,7 +100,7 @@ namespace StardewModdingAPI.Framework.Models /// <param name="logNetworkTraffic">Whether SMAPI should log network traffic.</param> /// <param name="consoleColors">The colors to use for text written to the SMAPI console.</param> /// <param name="suppressUpdateChecks">The mod IDs SMAPI should ignore when performing update checks or validating update keys.</param> - public SConfig(bool developerMode, bool? checkForUpdates, bool? paranoidWarnings, bool? useBetaChannel, string gitHubProjectName, string webApiBaseUrl, string[]? verboseLogging, bool? rewriteMods, bool? usePintail, bool? useRawImageLoading, bool? useCaseInsensitivePaths, bool? logNetworkTraffic, ColorSchemeConfig consoleColors, string[]? suppressUpdateChecks) + public SConfig(bool developerMode, bool? checkForUpdates, bool? paranoidWarnings, bool? useBetaChannel, string gitHubProjectName, string webApiBaseUrl, string[]? verboseLogging, bool? rewriteMods, bool? useRawImageLoading, bool? useCaseInsensitivePaths, bool? logNetworkTraffic, ColorSchemeConfig consoleColors, string[]? suppressUpdateChecks) { this.DeveloperMode = developerMode; this.CheckForUpdates = checkForUpdates ?? (bool)SConfig.DefaultValues[nameof(this.CheckForUpdates)]; |