summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-09 11:56:48 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-09 11:56:48 -0400
commit283e7d11325c9da6db942fd7de91579805694c83 (patch)
treed88242a65e041bb99f73bb0c7f58fbbbd0b5d8d0 /src/SMAPI/Framework
parent5ae87fbc01a8829a1a23f90efc25a5dbaada6e68 (diff)
parent6161cc91297dd215a35bfd4d8862d27a0d937898 (diff)
downloadSMAPI-283e7d11325c9da6db942fd7de91579805694c83.tar.gz
SMAPI-283e7d11325c9da6db942fd7de91579805694c83.tar.bz2
SMAPI-283e7d11325c9da6db942fd7de91579805694c83.zip
Merge pull request #836 from Tondorian/feature/CommandLineArgs
Add command-line arguments to toggle developer mode # Conflicts: # src/SMAPI/Program.cs
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/SCore.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index 6ca463a2..1a58d84b 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -173,7 +173,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>
- public SCore(string modsPath, bool writeToConsole)
+ /// <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;
@@ -190,6 +191,7 @@ namespace StardewModdingAPI.Framework
this.Settings = JsonConvert.DeserializeObject<SConfig>(File.ReadAllText(Constants.ApiConfigPath));
if (File.Exists(Constants.ApiUserConfigPath))
JsonConvert.PopulateObject(File.ReadAllText(Constants.ApiUserConfigPath), this.Settings);
+ this.Settings.DeveloperMode = developerMode ?? this.Settings.DeveloperMode;
this.LogManager = new LogManager(logPath: logPath, colorConfig: this.Settings.ConsoleColors, writeToConsole: writeToConsole, isVerbose: this.Settings.VerboseLogging, isDeveloperMode: this.Settings.DeveloperMode, getScreenIdForLog: this.GetScreenIdForLog);
this.CommandManager = new CommandManager(this.Monitor);