From e286e5591b315712909024f79f46c46563b65a56 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 May 2022 23:26:34 -0400 Subject: enable case-insensitive file paths by default for Android/Linux players --- src/SMAPI/Framework/Models/SConfig.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/Models/SConfig.cs') diff --git a/src/SMAPI/Framework/Models/SConfig.cs b/src/SMAPI/Framework/Models/SConfig.cs index 80d0d9ba..56ab623c 100644 --- a/src/SMAPI/Framework/Models/SConfig.cs +++ b/src/SMAPI/Framework/Models/SConfig.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using StardewModdingAPI.Internal.ConsoleWriting; +using StardewModdingAPI.Toolkit.Utilities; namespace StardewModdingAPI.Framework.Models { @@ -22,7 +23,7 @@ namespace StardewModdingAPI.Framework.Models [nameof(VerboseLogging)] = false, [nameof(LogNetworkTraffic)] = false, [nameof(RewriteMods)] = true, - [nameof(UsePintail)] = true, + [nameof(UsePintail)] = Constants.Platform is Platform.Android or Platform.Linux, [nameof(UseCaseInsensitivePaths)] = false }; -- cgit From 37617e9c26cad93dac462bc1893d167a4692d9df Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 May 2022 23:34:30 -0400 Subject: tweak default settings logic --- src/SMAPI/Framework/Models/SConfig.cs | 18 +++++++++--------- src/SMAPI/SMAPI.config.json | 13 ++++++------- 2 files changed, 15 insertions(+), 16 deletions(-) (limited to 'src/SMAPI/Framework/Models/SConfig.cs') diff --git a/src/SMAPI/Framework/Models/SConfig.cs b/src/SMAPI/Framework/Models/SConfig.cs index 56ab623c..d27c6311 100644 --- a/src/SMAPI/Framework/Models/SConfig.cs +++ b/src/SMAPI/Framework/Models/SConfig.cs @@ -96,19 +96,19 @@ namespace StardewModdingAPI.Framework.Models /// Whether SMAPI should log network traffic. /// The colors to use for text written to the SMAPI console. /// The mod IDs SMAPI should ignore when performing update checks or validating update keys. - public SConfig(bool developerMode, bool checkForUpdates, bool? paranoidWarnings, bool? useBetaChannel, string gitHubProjectName, string webApiBaseUrl, bool verboseLogging, bool? rewriteMods, bool? usePintail, bool? useCaseInsensitivePaths, bool logNetworkTraffic, ColorSchemeConfig consoleColors, string[]? suppressUpdateChecks) + public SConfig(bool developerMode, bool? checkForUpdates, bool? paranoidWarnings, bool? useBetaChannel, string gitHubProjectName, string webApiBaseUrl, bool? verboseLogging, bool? rewriteMods, bool? usePintail, bool? useCaseInsensitivePaths, bool? logNetworkTraffic, ColorSchemeConfig consoleColors, string[]? suppressUpdateChecks) { this.DeveloperMode = developerMode; - this.CheckForUpdates = checkForUpdates; - this.ParanoidWarnings = paranoidWarnings ?? (bool)SConfig.DefaultValues[nameof(SConfig.ParanoidWarnings)]; - this.UseBetaChannel = useBetaChannel ?? (bool)SConfig.DefaultValues[nameof(SConfig.UseBetaChannel)]; + this.CheckForUpdates = checkForUpdates ?? (bool)SConfig.DefaultValues[nameof(this.CheckForUpdates)]; + this.ParanoidWarnings = paranoidWarnings ?? (bool)SConfig.DefaultValues[nameof(this.ParanoidWarnings)]; + this.UseBetaChannel = useBetaChannel ?? (bool)SConfig.DefaultValues[nameof(this.UseBetaChannel)]; this.GitHubProjectName = gitHubProjectName; this.WebApiBaseUrl = webApiBaseUrl; - this.VerboseLogging = verboseLogging; - this.RewriteMods = rewriteMods ?? (bool)SConfig.DefaultValues[nameof(SConfig.RewriteMods)]; - this.UsePintail = usePintail ?? (bool)SConfig.DefaultValues[nameof(SConfig.UsePintail)]; - this.UseCaseInsensitivePaths = useCaseInsensitivePaths ?? (bool)SConfig.DefaultValues[nameof(SConfig.UseCaseInsensitivePaths)]; - this.LogNetworkTraffic = logNetworkTraffic; + this.VerboseLogging = verboseLogging ?? (bool)SConfig.DefaultValues[nameof(this.VerboseLogging)]; + this.RewriteMods = rewriteMods ?? (bool)SConfig.DefaultValues[nameof(this.RewriteMods)]; + this.UsePintail = usePintail ?? (bool)SConfig.DefaultValues[nameof(this.UsePintail)]; + this.UseCaseInsensitivePaths = useCaseInsensitivePaths ?? (bool)SConfig.DefaultValues[nameof(this.UseCaseInsensitivePaths)]; + this.LogNetworkTraffic = logNetworkTraffic ?? (bool)SConfig.DefaultValues[nameof(this.LogNetworkTraffic)]; this.ConsoleColors = consoleColors; this.SuppressUpdateChecks = suppressUpdateChecks ?? Array.Empty(); } diff --git a/src/SMAPI/SMAPI.config.json b/src/SMAPI/SMAPI.config.json index 31513438..8324f45b 100644 --- a/src/SMAPI/SMAPI.config.json +++ b/src/SMAPI/SMAPI.config.json @@ -40,9 +40,9 @@ copy all the settings, or you may cause bugs due to overridden changes in future "RewriteMods": true, /** - * Whether to make SMAPI file APIs case-insensitive, even on Linux. + * Whether to make SMAPI file APIs case-insensitive (even if the filesystem is case-sensitive). * - * When this is commented out, it'll be true on Android or Linux, and false otherwise. + * If null, it's only enabled on Android and Linux. */ "UseCaseInsensitivePaths": null, @@ -58,17 +58,16 @@ copy all the settings, or you may cause bugs due to overridden changes in future * part of their normal functionality, so these warnings are meaningless without further * investigation. * - * When this is commented out, it'll be true for local debug builds and false otherwise. + * If null, it's only enabled for local debug builds. */ - //"ParanoidWarnings": true, + "ParanoidWarnings": null, /** * Whether SMAPI should show newer beta versions as an available update. * - * When this is commented out, it'll be true if the current SMAPI version is beta, and false - * otherwise. + * If null, it's only enabled if the current SMAPI version is beta. */ - //"UseBetaChannel": true, + "UseBetaChannel": null, /** * SMAPI's GitHub project name, used to perform update checks. -- cgit From b924fbae4ba6c490b84d06453d7f46fecf480bf4 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 8 May 2022 12:24:52 -0400 Subject: fix default settings --- src/SMAPI/Framework/Models/SConfig.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/SMAPI/Framework/Models/SConfig.cs') diff --git a/src/SMAPI/Framework/Models/SConfig.cs b/src/SMAPI/Framework/Models/SConfig.cs index d27c6311..1c7cd3ed 100644 --- a/src/SMAPI/Framework/Models/SConfig.cs +++ b/src/SMAPI/Framework/Models/SConfig.cs @@ -23,8 +23,8 @@ namespace StardewModdingAPI.Framework.Models [nameof(VerboseLogging)] = false, [nameof(LogNetworkTraffic)] = false, [nameof(RewriteMods)] = true, - [nameof(UsePintail)] = Constants.Platform is Platform.Android or Platform.Linux, - [nameof(UseCaseInsensitivePaths)] = false + [nameof(UsePintail)] = true, + [nameof(UseCaseInsensitivePaths)] = Constants.Platform is Platform.Android or Platform.Linux }; /// The default values for , to log changes if different. -- cgit