From 092f0aa4eaa23c169c1ca5e8b213915f563f5053 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 9 Apr 2022 11:52:20 -0400 Subject: simplify format for new CLI arguments --- src/SMAPI/Framework/SCore.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/SMAPI/Framework') diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 801a7237..4746c2ce 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -168,8 +168,8 @@ namespace StardewModdingAPI.Framework /// Construct an instance. /// The path to search for mods. /// Whether to output log messages to the console. - /// null if not modified else whether to use developer mode - public SCore(string modsPath, bool writeToConsole, bool? developerModeValue) + /// Whether to enable development features, or null to use the value from the settings file. + public SCore(string modsPath, bool writeToConsole, bool? developerMode) { SCore.Instance = this; @@ -184,12 +184,7 @@ namespace StardewModdingAPI.Framework // init basics this.Settings = JsonConvert.DeserializeObject(File.ReadAllText(Constants.ApiConfigPath)); - - // temporary overwrite DeveloperMode Setting - if (developerModeValue.HasValue) - { - this.Settings.DeveloperMode = developerModeValue.Value; - } + this.Settings.DeveloperMode = developerMode ?? this.Settings.DeveloperMode; if (File.Exists(Constants.ApiUserConfigPath)) JsonConvert.PopulateObject(File.ReadAllText(Constants.ApiUserConfigPath), this.Settings); -- cgit