summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-09 11:52:20 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-09 11:52:20 -0400
commit092f0aa4eaa23c169c1ca5e8b213915f563f5053 (patch)
treef44e1392b69b4cfe68619d456b6846e5181e072d /src/SMAPI/Framework
parent61d857c41fc2b90cd495c4923251cb1ed472e5ca (diff)
downloadSMAPI-092f0aa4eaa23c169c1ca5e8b213915f563f5053.tar.gz
SMAPI-092f0aa4eaa23c169c1ca5e8b213915f563f5053.tar.bz2
SMAPI-092f0aa4eaa23c169c1ca5e8b213915f563f5053.zip
simplify format for new CLI arguments
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/SCore.cs11
1 files changed, 3 insertions, 8 deletions
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
/// <summary>Construct an instance.</summary>
/// <param name="modsPath">The path to search for mods.</param>
/// <param name="writeToConsole">Whether to output log messages to the console.</param>
- /// <param name="developerModeValue">null if not modified else whether to use developer mode</param>
- public SCore(string modsPath, bool writeToConsole, bool? developerModeValue)
+ /// <param name="developerMode">Whether to enable development features, or <c>null</c> to use the value from the settings file.</param>
+ public SCore(string modsPath, bool writeToConsole, bool? developerMode)
{
SCore.Instance = this;
@@ -184,12 +184,7 @@ namespace StardewModdingAPI.Framework
// init basics
this.Settings = JsonConvert.DeserializeObject<SConfig>(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);